com.dotmarketing.business
Interface PermissionAPI

All Known Implementing Classes:
PermissionBitAPIImpl

public interface PermissionAPI


Field Summary
static java.lang.String INDIVIDUAL_PERMISSION_TYPE
           
static int PERMISSION_CAN_ADD_CHILDREN
           
static int PERMISSION_CREATE_VIRTUAL_LINKS
           
static int PERMISSION_EDIT
           
static int PERMISSION_EDIT_PERMISSIONS
           
static int PERMISSION_PUBLISH
           
static int PERMISSION_READ
           
static int PERMISSION_USE
           
static int PERMISSION_WRITE
           
 
Method Summary
 void assignPermissions(java.util.List<Permission> permission, Permissionable permissionable, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Assigns a set of permissions to a given asset, any permissions already assigned to the asset are either updated or removed to match the provided list
 void cascadePermissionUnder(Permissionable permissionable, Role role)
          Navigates through the given permissionable children making sure all individual permissioned assets also have the same permission rules for the given role as the parent permissionable has.
 void clearCache()
          This method is to clear the permissions cache.
 void copyPermissions(Permissionable from, Permissionable to)
          copies permissions from one permissionable to another
 boolean doesRoleHavePermission(Permissionable permissionable, int permissionType, Role role)
          Return true if the role has permission over the permissionable the specified permission
 boolean doesRoleHavePermission(Permissionable permissionable, int permissionType, Role role, boolean respectFrontendRoles)
          Deprecated. respectFrontendRoles parameter does not makes sense and its been totally ignored. @see doesRoleHavePermission(Permissionable,int,Role)
 boolean doesUserHavePermission(Permissionable permissionable, int permissionType, com.liferay.portal.model.User user)
          Return true if the user have over the permissionable the specified permission This method is meant to be used by frontend call because assumes that frontend roles should respected
 boolean doesUserHavePermission(Permissionable permissionable, int permissionType, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Return true if the user have over the permissionable the specified permission
 boolean doesUserOwn(Inode inode, com.liferay.portal.model.User user)
           
<P extends Permissionable>
java.util.List<P>
filterCollection(java.util.List<P> permissionables, int requiredPermission, boolean respectFrontendRoles, com.liferay.portal.model.User user)
          Filters the given list of permissionables that meet the required permission mask
 java.util.List<Permission> getInheritablePermissions(Permissionable permissionable)
          Retrieves the list of permission that could be inherited from the given parent permissionable,
 java.util.List<Permission> getInheritablePermissions(Permissionable permissionable, boolean bitPermissions)
          Retrieves the list of permission that could be inherited from the given parent permissionable
 java.util.List<java.lang.Integer> getPermissionIdsFromRoles(Permissionable permissionable, Role[] roles, com.liferay.portal.model.User user)
          Retrieves the granted permissions for a given list of roles, E.G.
 java.util.List<java.lang.Integer> getPermissionIdsFromUser(Permissionable permissionable, com.liferay.portal.model.User user)
          Retrieves the granted permissions for a given user, E.G.
 java.util.List<Permission> getPermissions(Permissionable permissionable)
          Retrieves the list of permissions associated to the given permissionable, either searching from individual permissions directly associated or permissions inheriting from a parent This method returns permissions in the old format and not the compressed bit permissions format.
 java.util.List<Permission> getPermissions(Permissionable permissionable, boolean bitPermissions)
          Retrieves the list of permissions associated to the given permissionable, either searching from individual permissions directly associated or permissions inheriting from a parent If bitPermissions is set true this methods returns the permissions in the new bit compressed format so multiple permissions for the same role will be returned in one permission entry.
 java.util.List<Permission> getPermissions(Permissionable permissionable, boolean bitPermissions, boolean onlyIndividualPermissions)
          Retrieves the list of permissions associated to the given permissionable, either searching from individual permissions directly associated or permissions inheriting from a parent
 java.util.List<Permission> getPermissions(Permissionable permissionable, boolean bitPermissions, boolean onlyIndividualPermissions, boolean forceLoadFromDB)
          Retrieves the list of permissions associated to the given permissionable, either searching from individual permissions directly associated or permissions inheriting from a parent
 java.util.List<Permission> getPermissionsByRole(Role role, boolean onlyFoldersAndHosts)
          Retrieves all permissions associated to a given a role, includes individual and inheritable permissions
 java.util.List<Permission> getPermissionsByRole(Role role, boolean onlyFoldersAndHosts, boolean bitPermissions)
          Retrieves all permissions associated to a given a role, includes individual and inheritable permissions
 java.util.Map<java.lang.String,java.lang.Integer> getPermissionTypes()
          This method returns all the permission type masks configured in the system
 java.util.Set<Role> getPublishRoles(Permissionable permissionable)
          Deprecated. PermissionAPI.getRolesWithPermission
 java.util.Set<Role> getReadRoles(Permissionable permissionable)
          Deprecated. PermissionAPI.getRolesWithPermission
 java.util.Set<com.liferay.portal.model.User> getReadUsers(Permissionable permissionable)
          Deprecated. PermissionAPI.getUsersWithPermission
 int getRoleCount(java.lang.String permissionable, int permissionType, java.lang.String filter)
          Retrieves the count of roles associated with the given permissionable that poses permissionType access and filters them by name This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user
 int getRoleCount(java.lang.String permissionable, int permissionType, java.lang.String filter, boolean hideSystemRoles)
          Retrieves the count of roles associated with the given permissionable that poses permissionType access and filters them by name This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user
 java.util.List<Role> getRoles(java.lang.String permissionable, int permissionType, java.lang.String filter, int start, int limit)
          Retrieves the roles associated with the given permissionable that poses permissionType access and filters them by name This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user
 java.util.List<Role> getRoles(java.lang.String permissionable, int permissionType, java.lang.String filter, int start, int limit, boolean hideSystemRoles)
          Retrieves the roles associated with the given permissionable that poses permissionType access and filters them by name This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user
 java.util.Set<Role> getRolesWithPermission(Permissionable permissionable, int permission)
          Retrieves the list of roles that have the given permission granted on the permissionable
 int getUserCount(java.lang.String permissionable, int permissionType, java.lang.String filter)
          Retrieves the count of users with the given permissionType access to the given permissionable and filter the user names based on the given filter This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user
 java.util.List<com.liferay.portal.model.User> getUsers(java.lang.String permissionable, int permissionType, java.lang.String filter, int start, int limit)
          Retrieves the users with the given permissionType access to the given permissionable and filter the user names based on the given filter.
 java.util.Set<com.liferay.portal.model.User> getUsersWithPermission(Permissionable permissionable, int permission)
          Retrieves the list of users that have the given permission granted on the permissionable
 java.util.Set<Role> getWriteRoles(Permissionable permissionable)
          Deprecated. PermissionAPI.getRolesWithPermission
 java.util.Set<com.liferay.portal.model.User> getWriteUsers(Permissionable permissionable)
          Deprecated. PermissionAPI.getUsersWithPermission
 void mapAllPermissions()
          Get a map of all the permission that live page have
 int maskOfAllPermissions()
          Returns the bit mask of all system permissions
 void removePermissions(Permissionable permissionable)
          Remove all individual permissions attached to the asset
 void removePermissionsByRole(java.lang.String roleId)
          Remove all the permissions given the roleId
 void resetChildrenPermissionReferences(Structure structure)
          Removes the permission references of all content children of the given structure
 void resetPermissionReferences(Permissionable perm)
          Removes the given permissionable permission references forcing the api to recalculate the reference
 void resetPermissionsUnder(Permissionable parent)
          Recursively removes all individual and inheritable permissions of children of the given permissionable
 void save(Permission permission, Permissionable permissionable, com.liferay.portal.model.User user, boolean respectFrontendRoles)
          Saves an individual permission of a given permissionable
 void setDefaultCMSAdminPermissions(Permissionable permissionable)
          Sets the to the CMS_ADMINISTRATOR_ROLE permission over the permissionable
 void setDefaultCMSAnonymousPermissions(Permissionable permissionable)
          Sets reads the to the CMS_ANONYMOUS_ROLE permission over the permissionable
 void updateOwner(Permissionable asset, java.lang.String ownerId)
          This method updates the given permissionable owner with the given user id
 

Field Detail

PERMISSION_USE

static final int PERMISSION_USE

PERMISSION_EDIT

static final int PERMISSION_EDIT

PERMISSION_READ

static final int PERMISSION_READ

PERMISSION_WRITE

static final int PERMISSION_WRITE

PERMISSION_PUBLISH

static final int PERMISSION_PUBLISH

PERMISSION_EDIT_PERMISSIONS

static final int PERMISSION_EDIT_PERMISSIONS

PERMISSION_CREATE_VIRTUAL_LINKS

static final int PERMISSION_CREATE_VIRTUAL_LINKS

PERMISSION_CAN_ADD_CHILDREN

static final int PERMISSION_CAN_ADD_CHILDREN

INDIVIDUAL_PERMISSION_TYPE

static final java.lang.String INDIVIDUAL_PERMISSION_TYPE
See Also:
Constant Field Values
Method Detail

getPermissionTypes

java.util.Map<java.lang.String,java.lang.Integer> getPermissionTypes()
This method returns all the permission type masks configured in the system

Returns:
Since:
1.8

doesRoleHavePermission

boolean doesRoleHavePermission(Permissionable permissionable,
                               int permissionType,
                               Role role,
                               boolean respectFrontendRoles)
                               throws DotDataException
Deprecated. respectFrontendRoles parameter does not makes sense and its been totally ignored. @see doesRoleHavePermission(Permissionable,int,Role)

Return true if the role has permission over the permissionable the specified permission

Parameters:
permissionable -
permissionType -
role -
Returns:
Throws:
DotDataException
Since:
1.0

doesRoleHavePermission

boolean doesRoleHavePermission(Permissionable permissionable,
                               int permissionType,
                               Role role)
                               throws DotDataException
Return true if the role has permission over the permissionable the specified permission

Parameters:
permissionable -
permissionType -
role -
Returns:
Throws:
DotDataException
Since:
1.0

doesUserHavePermission

boolean doesUserHavePermission(Permissionable permissionable,
                               int permissionType,
                               com.liferay.portal.model.User user)
                               throws DotDataException
Return true if the user have over the permissionable the specified permission This method is meant to be used by frontend call because assumes that frontend roles should respected

Parameters:
o - permissionable
permissionId -
user -
Returns:
boolean
Throws:
DotDataException
Since:
1.0

doesUserHavePermission

boolean doesUserHavePermission(Permissionable permissionable,
                               int permissionType,
                               com.liferay.portal.model.User user,
                               boolean respectFrontendRoles)
                               throws DotDataException
Return true if the user have over the permissionable the specified permission

Parameters:
o - permissionable
permissionId -
user -
respectFrontendRoles -
Returns:
boolean
Throws:
DotDataException
Since:
1.5

removePermissions

void removePermissions(Permissionable permissionable)
                       throws DotDataException
Remove all individual permissions attached to the asset

Parameters:
o - permissionable
Throws:
DotDataException
Since:
1.0

setDefaultCMSAdminPermissions

void setDefaultCMSAdminPermissions(Permissionable permissionable)
                                   throws DotDataException
Sets the to the CMS_ADMINISTRATOR_ROLE permission over the permissionable

Parameters:
permissionable -
Throws:
DotDataException
Since:
1.0

setDefaultCMSAnonymousPermissions

void setDefaultCMSAnonymousPermissions(Permissionable permissionable)
                                       throws DotDataException
Sets reads the to the CMS_ANONYMOUS_ROLE permission over the permissionable

Parameters:
permissionable -
Throws:
DotDataException
Since:
1.8

copyPermissions

void copyPermissions(Permissionable from,
                     Permissionable to)
                     throws DotDataException
copies permissions from one permissionable to another

Parameters:
from - permissionable
to - permissionable
Throws:
DotDataException
Since:
1.0

getPermissions

java.util.List<Permission> getPermissions(Permissionable permissionable)
                                          throws DotDataException
Retrieves the list of permissions associated to the given permissionable, either searching from individual permissions directly associated or permissions inheriting from a parent This method returns permissions in the old format and not the compressed bit permissions format.

Parameters:
permissionable -
Returns:
List
Throws:
DotDataException
Since:
1.5.0.1

getPermissions

java.util.List<Permission> getPermissions(Permissionable permissionable,
                                          boolean bitPermissions)
                                          throws DotDataException
Retrieves the list of permissions associated to the given permissionable, either searching from individual permissions directly associated or permissions inheriting from a parent If bitPermissions is set true this methods returns the permissions in the new bit compressed format so multiple permissions for the same role will be returned in one permission entry. E.G. read and write permissions for role X will be returned in a single permission object having role = X permission = read | write. @see com.dotmarketing.beans.Permission.matchesPermissionType to identify the permission itself and @see com.dotmarketing.business.PermissionAPI for the different kind of permissions managed by the system

Parameters:
permissionable -
bitPermissions - if true returns the new compressed bit permissions format, where multiple permissions can be stored in a single permission object
Returns:
List
Throws:
DotDataException
Since:
1.7

getPermissions

java.util.List<Permission> getPermissions(Permissionable permissionable,
                                          boolean bitPermissions,
                                          boolean onlyIndividualPermissions)
                                          throws DotDataException
Retrieves the list of permissions associated to the given permissionable, either searching from individual permissions directly associated or permissions inheriting from a parent

Parameters:
permissionable -
bitPermissions - if true returns the new compressed bit permissions format, where multiple permissions can be stored in a single permission object
onlyIndividualPermissions - If true it will only look for individually set permissions in the asset and not try to go and search through the chain of permissions inheritance
Returns:
List
Throws:
DotDataException
Since:
1.9

getPermissions

java.util.List<Permission> getPermissions(Permissionable permissionable,
                                          boolean bitPermissions,
                                          boolean onlyIndividualPermissions,
                                          boolean forceLoadFromDB)
                                          throws DotDataException
Retrieves the list of permissions associated to the given permissionable, either searching from individual permissions directly associated or permissions inheriting from a parent

Parameters:
permissionable -
bitPermissions - if true returns the new compressed bit permissions format, where multiple permissions can be stored in a single permission object
onlyIndividualPermissions - If true it will only look for individually set permissions in the asset and not try to go and search through the chain of permissions inheritance
forceLoadFromDB - Forces to load from DB
Returns:
List
Throws:
DotDataException
Since:
1.9

getInheritablePermissions

java.util.List<Permission> getInheritablePermissions(Permissionable permissionable)
                                                     throws DotDataException
Retrieves the list of permission that could be inherited from the given parent permissionable,

Parameters:
permissionable -
Returns:
Throws:
DotDataException

getInheritablePermissions

java.util.List<Permission> getInheritablePermissions(Permissionable permissionable,
                                                     boolean bitPermissions)
                                                     throws DotDataException
Retrieves the list of permission that could be inherited from the given parent permissionable

Parameters:
permissionable -
bitPermissions - if true the compact bit version of permissions will be returned
Returns:
Throws:
DotDataException

getReadRoles

java.util.Set<Role> getReadRoles(Permissionable permissionable)
                                 throws DotDataException
Deprecated. PermissionAPI.getRolesWithPermission

Returns a set of role names whose has read access over a specific asset. This method returns a set of string.

Parameters:
o - permissionable to get read roles for
Returns:
set of role names
Throws:
DotDataException
Since:
1.5

getReadUsers

java.util.Set<com.liferay.portal.model.User> getReadUsers(Permissionable permissionable)
                                                          throws DotDataException
Deprecated. PermissionAPI.getUsersWithPermission

Returns a set of role names whose has read access over a specific asset. This method returns a set of string.

Parameters:
o - permissionable to get read roles for
Returns:
set of User names
Throws:
DotDataException
Since:
1.5

getPublishRoles

java.util.Set<Role> getPublishRoles(Permissionable permissionable)
                                    throws DotDataException
Deprecated. PermissionAPI.getRolesWithPermission

Returns a set of role names whose has publish access over a specific asset. This method returns a set of string.

Parameters:
o - permissionable to get read roles for
Returns:
set of role names
Throws:
DotDataException
Since:
1.5

getWriteRoles

java.util.Set<Role> getWriteRoles(Permissionable permissionable)
                                  throws DotDataException
Deprecated. PermissionAPI.getRolesWithPermission

Returns a set of role names whose has write access over a specific asset. This method returns a set of string.

Parameters:
o - permissionable to get read roles for
Returns:
set of role names
Throws:
DotDataException
Since:
1.5

getWriteUsers

java.util.Set<com.liferay.portal.model.User> getWriteUsers(Permissionable permissionable)
                                                           throws DotDataException
Deprecated. PermissionAPI.getUsersWithPermission

Returns a set of role names whose has write access over a specific asset. This method returns a set of string.

Parameters:
o - permissionable to get read roles for
Returns:
set of Users
Throws:
DotDataException
Since:
1.5

getRolesWithPermission

java.util.Set<Role> getRolesWithPermission(Permissionable permissionable,
                                           int permission)
                                           throws DotDataException
Retrieves the list of roles that have the given permission granted on the permissionable

Parameters:
permissionable -
permission -
Returns:
Throws:
DotDataException
Since:
1.9

getUsersWithPermission

java.util.Set<com.liferay.portal.model.User> getUsersWithPermission(Permissionable permissionable,
                                                                    int permission)
                                                                    throws DotDataException
Retrieves the list of users that have the given permission granted on the permissionable

Parameters:
permissionable -
permission -
Returns:
Throws:
DotDataException
Since:
1.9

doesUserOwn

boolean doesUserOwn(Inode inode,
                    com.liferay.portal.model.User user)
                    throws DotDataException
Parameters:
inode - The inode to look for
user - The user to check against
Returns:
true if the given user owns the passed inode, false otherwise
Throws:
DotDataException
Since:
1.5

mapAllPermissions

void mapAllPermissions()
                       throws DotDataException
Get a map of all the permission that live page have

Throws:
DotDataException
Since:
1.5

getPermissionIdsFromRoles

java.util.List<java.lang.Integer> getPermissionIdsFromRoles(Permissionable permissionable,
                                                            Role[] roles,
                                                            com.liferay.portal.model.User user)
                                                            throws DotDataException
Retrieves the granted permissions for a given list of roles, E.G. it returns READ, WRITE if the given roles have permissions to READ and WRITE on the given permissionable

Parameters:
permissionable -
roles -
Returns:
List of PermissionIds
Throws:
DotDataException
Since:
1.5

getPermissionIdsFromUser

java.util.List<java.lang.Integer> getPermissionIdsFromUser(Permissionable permissionable,
                                                           com.liferay.portal.model.User user)
                                                           throws DotDataException
Retrieves the granted permissions for a given user, E.G. it returns READ, WRITE if any of the user roles have permissions to READ and WRITE on the given permissionable

Parameters:
permissionable -
roles -
Returns:
List of PermissionIds
Throws:
DotDataException
Since:
1.5

getRoles

java.util.List<Role> getRoles(java.lang.String permissionable,
                              int permissionType,
                              java.lang.String filter,
                              int start,
                              int limit)
Retrieves the roles associated with the given permissionable that poses permissionType access and filters them by name This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user

Parameters:
permissionable -
permissionType -
filter -
start -
limit -
Returns:
Since:
1.6

getRoles

java.util.List<Role> getRoles(java.lang.String permissionable,
                              int permissionType,
                              java.lang.String filter,
                              int start,
                              int limit,
                              boolean hideSystemRoles)
Retrieves the roles associated with the given permissionable that poses permissionType access and filters them by name This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user

Parameters:
permissionable -
permissionType -
filter -
start -
limit -
Returns:
Since:
1.6

getRoleCount

int getRoleCount(java.lang.String permissionable,
                 int permissionType,
                 java.lang.String filter)
Retrieves the count of roles associated with the given permissionable that poses permissionType access and filters them by name This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user

Parameters:
permissionable -
permissionType -
filter -
Returns:
Since:
1.6

getRoleCount

int getRoleCount(java.lang.String permissionable,
                 int permissionType,
                 java.lang.String filter,
                 boolean hideSystemRoles)
Retrieves the count of roles associated with the given permissionable that poses permissionType access and filters them by name This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user

Parameters:
permissionable -
permissionType -
filter -
Returns:
Since:
1.8

getUsers

java.util.List<com.liferay.portal.model.User> getUsers(java.lang.String permissionable,
                                                       int permissionType,
                                                       java.lang.String filter,
                                                       int start,
                                                       int limit)
Retrieves the users with the given permissionType access to the given permissionable and filter the user names based on the given filter. This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user

Parameters:
permissionable -
permissionType -
filter -
start -
limit -
Returns:
Since:
1.6

getUserCount

int getUserCount(java.lang.String permissionable,
                 int permissionType,
                 java.lang.String filter)
Retrieves the count of users with the given permissionType access to the given permissionable and filter the user names based on the given filter This method is intended for backend usage is does not check for frontend specific roles like cms anon o logged in site user

Parameters:
permissionable -
permissionType -
filter -
Returns:
Since:
1.6

getPermissionsByRole

java.util.List<Permission> getPermissionsByRole(Role role,
                                                boolean onlyFoldersAndHosts)
                                                throws DotDataException
Retrieves all permissions associated to a given a role, includes individual and inheritable permissions

Parameters:
role -
onlyFoldersAndHosts - filters for only permissions assigned to folders and hosts
Returns:
a bit permissions list
Throws:
DotDataException

getPermissionsByRole

java.util.List<Permission> getPermissionsByRole(Role role,
                                                boolean onlyFoldersAndHosts,
                                                boolean bitPermissions)
                                                throws DotDataException
Retrieves all permissions associated to a given a role, includes individual and inheritable permissions

Parameters:
role -
onlyFoldersAndHosts - filters for only permissions assigned to folders and hosts
Returns:
a bit permissions list
Throws:
DotDataException

filterCollection

<P extends Permissionable> java.util.List<P> filterCollection(java.util.List<P> permissionables,
                                                              int requiredPermission,
                                                              boolean respectFrontendRoles,
                                                              com.liferay.portal.model.User user)
                                                          throws DotDataException,
                                                                 DotSecurityException
Filters the given list of permissionables that meet the required permission mask

Type Parameters:
P - The type of permissionable given to the method
Parameters:
permissionables -
requiredPermission -
respectFrontendRoles -
user -
Returns:
Throws:
DotDataException
DotSecurityException
Since:
1.6

removePermissionsByRole

void removePermissionsByRole(java.lang.String roleId)
Remove all the permissions given the roleId

Parameters:
roleId -
Since:
1.6

save

void save(Permission permission,
          Permissionable permissionable,
          com.liferay.portal.model.User user,
          boolean respectFrontendRoles)
          throws DotDataException,
                 DotSecurityException
Saves an individual permission of a given permissionable

Parameters:
permission -
permissionable -
Throws:
DotDataException
DotSecurityException

assignPermissions

void assignPermissions(java.util.List<Permission> permission,
                       Permissionable permissionable,
                       com.liferay.portal.model.User user,
                       boolean respectFrontendRoles)
                       throws DotDataException,
                              DotSecurityException
Assigns a set of permissions to a given asset, any permissions already assigned to the asset are either updated or removed to match the provided list

Parameters:
permission -
permissionable -
Throws:
DotDataException
DotSecurityException

clearCache

void clearCache()
This method is to clear the permissions cache. Should only need to be called for maintenance or debug reasons

Since:
1.6

updateOwner

void updateOwner(Permissionable asset,
                 java.lang.String ownerId)
                 throws DotDataException
This method updates the given permissionable owner with the given user id

Parameters:
asset -
ownerId -
Throws:
DotDataException

maskOfAllPermissions

int maskOfAllPermissions()
Returns the bit mask of all system permissions

Returns:

resetPermissionsUnder

void resetPermissionsUnder(Permissionable parent)
                           throws DotDataException
Recursively removes all individual and inheritable permissions of children of the given permissionable

Parameters:
parent -
Throws:
DotDataException

cascadePermissionUnder

void cascadePermissionUnder(Permissionable permissionable,
                            Role role)
                            throws DotDataException
Navigates through the given permissionable children making sure all individual permissioned assets also have the same permission rules for the given role as the parent permissionable has. Therefore if a child that is individually permissioned (not inheriting) does not have an individual permission for the given role then the permission will be created, if the child asset already have a permission for the given role then the permission is updated, and at last if the asset has an individual permission for the role but the parent doesn't then the individual permission is removed from the child.

Parameters:
permissionable -
role -
Throws:
DotDataException

resetPermissionReferences

void resetPermissionReferences(Permissionable perm)
                               throws DotDataException
Removes the given permissionable permission references forcing the api to recalculate the reference

Parameters:
perm -
Throws:
DotDataException

resetChildrenPermissionReferences

void resetChildrenPermissionReferences(Structure structure)
                                       throws DotDataException
Removes the permission references of all content children of the given structure

Parameters:
perm -
Throws:
DotDataException


Copyright © 2010 dotCMS Inc. All Rights Reserved.