public class ResourceTypePermissionImpl extends ResourceTypePermissionBaseImpl
Resource type permissions can exist at either company or group scope. They are roughly equivalent to resource permissions with company, group, or group-template scope. However, resource type permissions make no distinction between company and group-template scope, storing both as company scope permissions. The reason for this simplification is that regular roles cannot have group-template scope permissions, and site/organization roles can only have group-template scope permissions. Therefore, resource type permissions depend on the type of their associated role to distinguish between the two scopes.
Do not confuse resource type permissions with resource block permissions; they serve very different purposes. Resource block permissions store the permissions on a single resource block, and are simply a representation of who can do what to the resources within the block. Resource type permissions grant permissions to perform actions on all resources of a type within a group or company. Any permissions granted to a role with a resource type permission are automatically added to all the resource blocks for that resource type within the group/company.
For example, if a company scope resource type permission is granted to a role to edit blog entries, all the resource blocks within the company for blog entries are modified to grant the role permission to edit the blog entries they contain. Thus, granting and revoking resource type permissions will also cause those same permissions to be granted/revoked at the resource block permission level.
Copying permissions from the company and group scope to the resource block scope eliminates the need to check multiple scopes when determining if a role has permission to perform an action on a resource. All the necessary information is cached at the most granular level.
Rather than using a separate "scope" attribute as resource permissions do, company scope resource type
permissions simply have a
The type of resource the permission grants access to is specified by the
name attribute, which must be the fully qualified class name of
a model (such as a blog entry).
actionIds attribute stores the bitwise IDs of all the
actions allowed by this permission.
COLUMN_BITMASK_ENABLED, COMPANYID_COLUMN_BITMASK, DATA_SOURCE, ENTITY_CACHE_ENABLED, FINDER_CACHE_ENABLED, GROUPID_COLUMN_BITMASK, LOCK_EXPIRATION_TIME, NAME_COLUMN_BITMASK, ORDER_BY_JPQL, ORDER_BY_SQL, RESOURCETYPEPERMISSIONID_COLUMN_BITMASK, ROLEID_COLUMN_BITMASK, SESSION_FACTORY, TABLE_COLUMNS, TABLE_COLUMNS_MAP, TABLE_NAME, TABLE_SQL_CREATE, TABLE_SQL_DROP, TX_MANAGER
|Constructor and Description|
|Modifier and Type||Method and Description|
clone, compareTo, equals, getActionIds, getColumnBitmask, getCompanyId, getExpandoBridge, getGroupId, getModelAttributes, getModelClass, getModelClassName, getMvccVersion, getName, getOriginalCompanyId, getOriginalGroupId, getOriginalName, getOriginalRoleId, getPrimaryKey, getPrimaryKeyObj, getResourceTypePermissionId, getRoleId, hashCode, isEntityCacheEnabled, isFinderCacheEnabled, resetOriginalValues, setActionIds, setCompanyId, setExpandoBridgeAttributes, setGroupId, setModelAttributes, setMvccVersion, setName, setPrimaryKey, setPrimaryKeyObj, setResourceTypePermissionId, setRoleId, toCacheModel, toEscapedModel, toString, toXmlString
getLocale, isCachedModel, isEscapedModel, isNew, setCachedModel, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setNew, toUnescapedModel
clone, compareTo, getActionIds, getCompanyId, getExpandoBridge, getGroupId, getMvccVersion, getName, getPrimaryKey, getPrimaryKeyObj, getResourceTypePermissionId, getRoleId, hashCode, isCachedModel, isEscapedModel, isNew, setActionIds, setCachedModel, setCompanyId, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setExpandoBridgeAttributes, setGroupId, setMvccVersion, setName, setNew, setPrimaryKey, setPrimaryKeyObj, setResourceTypePermissionId, setRoleId, toCacheModel, toEscapedModel, toString, toUnescapedModel, toXmlString
getModelAttributes, isEntityCacheEnabled, isFinderCacheEnabled, resetOriginalValues, setModelAttributes