## content_permission

Content Repository : content_permission

- Overview
- Related Objects
- API

### Overview

Permissions can be set to allow certain users certain things. - They can be compared with the Unix filesystem permission: read, write ...

### Related Objects

See also: {content_item }

### API

- Function: content_permission.has_grant_authority

  Determine if the user may grant a certain permission to another user. The permission may only be granted if the user has the permission himself and posesses the cm_perm access, or if the user posesses the cm_perm_admin access.

  Author: | Karl Goldstein
  Returns: | 't' if the donation is possible, 'f' otherwise
  Parameters:

  > object_id: |  | The object whose permissions are to be changed
  > holder_id: |  | The person who is attempting to grant the permissions
  > privilege: |  | The privilege to be granted

  Declaration:

        function has_grant_authority (
          object_id         in acs_objects.object_id%TYPE,
          holder_id         in parties.party_id%TYPE,
          privilege         in acs_privileges.privilege%TYPE
        ) return varchar2;

  See Also: | content_permission.grant_permission, content_permission.is_has_revoke_authority, acs_permission.grant_permission

- Function: content_permission.has_revoke_authority

  Determine if the user may take a certain permission away from another user. The permission may only be revoked if the user has the permission himself and posesses the cm_perm access, while the other user does not, or if the user posesses the cm_perm_admin access.

  Author: | Karl Goldstein
  Returns: | 't' if it is possible to revoke the privilege, 'f' otherwise
  Parameters:

  > object_id: |  | The object whose permissions are to be changed
  > holder_id: |  | The person who is attempting to revoke the permissions
  > privilege: |  | The privilege to be revoked
  > revokee_id: |  | The user from whom the privilege is to be taken away

  Declaration:

        function has_revoke_authority (
          object_id         in acs_objects.object_id%TYPE,
          holder_id         in parties.party_id%TYPE,
          privilege         in acs_privileges.privilege%TYPE,
          revokee_id        in parties.party_id%TYPE
        ) return varchar2;

  See Also: | content_permission.has_grant_authority, content_permission.revoke_permission, acs_permission.revoke_permission

- Function: content_permission.permission_p

  Determine if the user has the specified permission on the specified object. Does NOT check objects recursively: that is, if the user has the permission on the parent object, he does not automatically gain the permission on all the child objects.

  Author: | Karl Goldstein
  Returns: | 't' if the user has the specified permission on the object, 'f' otherwise
  Parameters:

  > object_id: |  | The object whose permissions are to be checked
  > holder_id: |  | The person whose permissions are to be examined
  > privilege: |  | The privilege to be checked

  Declaration:

        function permission_p (
          object_id         in acs_objects.object_id%TYPE,
          holder_id         in parties.party_id%TYPE,
          privilege         in acs_privileges.privilege%TYPE
        ) return varchar2;

  See Also: | content_permission.grant_permission, content_permission.revoke_permission, acs_permission.permission_p

- Procedure: content_permission.grant_permission

  This is a helper function for content_permission.grant_permission and should not be called individually.

  Grants a permission and revokes all descendants of the permission, since they are no longer relevant.

  Author: | Karl Goldstein
  Parameters:

  > object_id: |  | The object whose permissions are to be changed
  > grantee_id: |  | The person who should gain the parent privilege
  > privilege: |  | The parent privilege to be granted

  Declaration:

        procedure grant_permission_h (
          object_id         in acs_objects.object_id%TYPE,
          grantee_id        in parties.party_id%TYPE,
          privilege         in acs_privileges.privilege%TYPE
        );

  See Also: | content_permission.grant_permission

- Procedure: content_permission.grant_permission_h

  This is a helper function for content_permission.grant_permission and should not be called individually.

  Grants a permission and revokes all descendants of the permission, since they are no longer relevant.

  Author: | Karl Goldstein
  Parameters:

  > object_id: |  | The object whose permissions are to be changed
  > grantee_id: |  | The person who should gain the parent privilege
  > privilege: |  | The parent privilege to be granted

  Declaration:

        procedure grant_permission_h (
          object_id         in acs_objects.object_id%TYPE,
          grantee_id        in parties.party_id%TYPE,
          privilege         in acs_privileges.privilege%TYPE
        );

  See Also: | content_permission.grant_permission

- Procedure: content_permission.inherit_permissions

  Make the child object inherit all of the permissions of the parent object. Typically, this function is called whenever a new object is created under a given parent

  Author: | Karl Goldstein
  Parameters:

  > parent_object_id: |  | The parent object id
  > child_object_id: |  | The child object id

  Declaration:

        procedure inherit_permissions (
          parent_object_id  in acs_objects.object_id%TYPE,
          child_object_id   in acs_objects.object_id%TYPE,
          child_creator_id  in parties.party_id%TYPE default null
        );

  See Also: | content_permission.grant, acs_permission.grant_permission

- Procedure: content_permission.revoke_permission

  This is a helper function for content_permission.revoke_permission and should not be called individually.

  Revokes a permission but grants all child permissions to the holder, to ensure that the permission is not permanently lost

  Author: | Karl Goldstein
  Parameters:

  > object_id: |  | The object whose permissions are to be changed
  > revokee_id: |  | The person who should lose the parent permission
  > privilege: |  | The parent privilege to be revoked

  Declaration:

        procedure revoke_permission_h (
          object_id         in acs_objects.object_id%TYPE,
          revokee_id        in parties.party_id%TYPE,
          privilege         in acs_privileges.privilege%TYPE
        );

  See Also: | content_permission.revoke_permission

- Procedure: content_permission.revoke_permission_h

  This is a helper function for content_permission.revoke_permission and should not be called individually.

  Revokes a permission but grants all child permissions to the holder, to ensure that the permission is not permanently lost

  Author: | Karl Goldstein
  Parameters:

  > object_id: |  | The object whose permissions are to be changed
  > revokee_id: |  | The person who should lose the parent permission
  > privilege: |  | The parent privilege to be revoked

  Declaration:

        procedure revoke_permission_h (
          object_id         in acs_objects.object_id%TYPE,
          revokee_id        in parties.party_id%TYPE,
          privilege         in acs_privileges.privilege%TYPE
        );

  See Also: | content_permission.revoke_permission

  Last Modified: $Id: permission.html,v 1.1.1.1 2001/03/13 22:59:26 ben Exp $