...
After a few beers, our service architect equates a Resource with an Organization. While it is the Agent that is creating or updating a Hold, the authorization has been granted to a Resource.
Code Block | ||
---|---|---|
| ||
public org.osid.hold.Issue createIssue(org.osid.hold.IssueForm form) throws org.osid.NotFoundException, org.osid.OperationFailedException, org.osid.PermissionDeniedException { org.osid.hold.Issue peristIssue(form); OrganizationHoldFormRecord record = (OrganizationHoldFormRecord) form.getIssueFormRecord(organizationHoldRecordType); try (org.osid.id.IdList orgIds = record.getHoldCreatorOrganizationIds()) { while (orgIds.hasNext()) { org.osid.authorization.AuthorizationForm authorizationForm = authorizationSession.getAuthorizationFormForCreateForResource(orgIds.getNextId(), CREATEHOLD_FUNCTION_ID, issue.getId()); authorizationSession.createAuthorization(authorizationForm); } } } |
Better. However, the service architect feels she is kicking the can down the street. The can arrived at the Resource OSID.