com.liferay.portal.security.permission
Class AdvancedPermissionChecker
java.lang.Object
com.liferay.portal.security.permission.BasePermissionChecker
com.liferay.portal.security.permission.AdvancedPermissionChecker
- All Implemented Interfaces:
- com.liferay.portal.kernel.security.permission.PermissionChecker, Cloneable
public class AdvancedPermissionChecker
- extends BasePermissionChecker
| Fields inherited from interface com.liferay.portal.kernel.security.permission.PermissionChecker |
DEFAULT_ROLE_IDS |
|
Method Summary |
protected void |
addTeamRoles(long userId,
com.liferay.portal.kernel.model.Group group,
Set<Long> roleIds)
|
AdvancedPermissionChecker |
clone()
|
protected boolean |
doCheckPermission(long companyId,
long groupId,
String name,
String primKey,
long[] roleIds,
String actionId,
org.apache.commons.lang.time.StopWatch stopWatch)
|
protected long[] |
doGetRoleIds(long userId,
long groupId)
|
com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag |
getGuestResourceBlockIdsBag(long companyId,
long groupId,
String name)
|
long[] |
getGuestUserRoleIds()
Returns the permission checker bag for the guest user. |
List<Long> |
getOwnerResourceBlockIds(long companyId,
long groupId,
String name,
String actionId)
|
com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag |
getOwnerResourceBlockIdsBag(long companyId,
long groupId,
String name)
|
List<Long> |
getResourceBlockIds(long companyId,
long groupId,
long userId,
String name,
String actionId)
|
com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag |
getResourceBlockIdsBag(long companyId,
long groupId,
String name,
long[] roleIds)
|
protected List<com.liferay.portal.kernel.model.Resource> |
getResources(long companyId,
long groupId,
String name,
String primKey,
String actionId)
Returns representations of the resource at each scope level. |
long[] |
getRoleIds(long userId,
long groupId)
|
com.liferay.portal.kernel.security.permission.UserBag |
getUserBag()
|
protected boolean |
hasGuestPermission(long groupId,
String name,
String primKey,
String actionId)
|
boolean |
hasOwnerPermission(long companyId,
String name,
String primKey,
long ownerId,
String actionId)
|
boolean |
hasPermission(long groupId,
String name,
String primKey,
String actionId)
|
protected boolean |
hasPermissionImpl(long groupId,
String name,
String primKey,
long[] roleIds,
String actionId)
|
protected boolean |
hasUserPermissionImpl(long groupId,
String name,
String primKey,
long[] roleIds,
String actionId)
|
boolean |
isCompanyAdmin()
|
boolean |
isCompanyAdmin(long companyId)
|
protected boolean |
isCompanyAdminImpl(long companyId)
|
boolean |
isContentReviewer(long companyId,
long groupId)
|
protected boolean |
isContentReviewerImpl(long groupId)
|
protected boolean |
isContentReviewerImpl(long companyId,
long groupId)
|
boolean |
isGroupAdmin(long groupId)
|
protected boolean |
isGroupAdminImpl(com.liferay.portal.kernel.model.Group group)
|
protected boolean |
isGroupAdminImpl(long groupId)
|
boolean |
isGroupMember(long groupId)
|
protected boolean |
isGroupMemberImpl(long groupId)
|
boolean |
isGroupOwner(long groupId)
|
protected boolean |
isGroupOwnerImpl(com.liferay.portal.kernel.model.Group group)
|
protected boolean |
isGroupOwnerImpl(long groupId)
|
boolean |
isOrganizationAdmin(long organizationId)
|
protected boolean |
isOrganizationAdminImpl(long organizationId)
|
protected boolean |
isOrganizationAdminImpl(com.liferay.portal.kernel.model.Organization organization)
|
boolean |
isOrganizationOwner(long organizationId)
|
protected boolean |
isOrganizationOwnerImpl(long organizationId)
|
protected boolean |
isOrganizationOwnerImpl(com.liferay.portal.kernel.model.Organization organization)
|
protected void |
logHasUserPermission(long groupId,
String name,
String primKey,
String actionId,
org.apache.commons.lang.time.StopWatch stopWatch,
int block)
|
| Methods inherited from class com.liferay.portal.security.permission.BasePermissionChecker |
getCompanyId, getOwnerRoleId, getUser, getUserId, hasOwnerPermission, hasPermission, init, isCheckGuest, isCommunityAdmin, isCommunityOwner, isOmniadmin, isSignedIn, resetValues, setValues |
RESULTS_SEPARATOR
@Deprecated
protected static final String RESULTS_SEPARATOR
- Deprecated. As of 6.1.0
- See Also:
- Constant Field Values
AdvancedPermissionChecker
public AdvancedPermissionChecker()
clone
public AdvancedPermissionChecker clone()
- Specified by:
clone in interface com.liferay.portal.kernel.security.permission.PermissionChecker- Specified by:
clone in class BasePermissionChecker
getGuestResourceBlockIdsBag
public com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag getGuestResourceBlockIdsBag(long companyId,
long groupId,
String name)
throws Exception
- Throws:
Exception
getGuestUserRoleIds
public long[] getGuestUserRoleIds()
throws Exception
- Returns the permission checker bag for the guest user.
- Returns:
- the permission checker bag for the guest user
- Throws:
Exception - if an exception occurred
getOwnerResourceBlockIds
public List<Long> getOwnerResourceBlockIds(long companyId,
long groupId,
String name,
String actionId)
- Specified by:
getOwnerResourceBlockIds in interface com.liferay.portal.kernel.security.permission.PermissionChecker- Overrides:
getOwnerResourceBlockIds in class BasePermissionChecker
getOwnerResourceBlockIdsBag
public com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag getOwnerResourceBlockIdsBag(long companyId,
long groupId,
String name)
getResourceBlockIds
public List<Long> getResourceBlockIds(long companyId,
long groupId,
long userId,
String name,
String actionId)
- Specified by:
getResourceBlockIds in interface com.liferay.portal.kernel.security.permission.PermissionChecker- Overrides:
getResourceBlockIds in class BasePermissionChecker
getResourceBlockIdsBag
public com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag getResourceBlockIdsBag(long companyId,
long groupId,
String name,
long[] roleIds)
throws Exception
- Throws:
Exception
getRoleIds
public long[] getRoleIds(long userId,
long groupId)
- Specified by:
getRoleIds in interface com.liferay.portal.kernel.security.permission.PermissionChecker- Overrides:
getRoleIds in class BasePermissionChecker
getUserBag
public com.liferay.portal.kernel.security.permission.UserBag getUserBag()
throws com.liferay.portal.kernel.exception.PortalException
- Throws:
com.liferay.portal.kernel.exception.PortalException
hasOwnerPermission
public boolean hasOwnerPermission(long companyId,
String name,
String primKey,
long ownerId,
String actionId)
hasPermission
public boolean hasPermission(long groupId,
String name,
String primKey,
String actionId)
isCompanyAdmin
public boolean isCompanyAdmin()
isCompanyAdmin
public boolean isCompanyAdmin(long companyId)
isContentReviewer
public boolean isContentReviewer(long companyId,
long groupId)
isGroupAdmin
public boolean isGroupAdmin(long groupId)
isGroupMember
public boolean isGroupMember(long groupId)
isGroupOwner
public boolean isGroupOwner(long groupId)
isOrganizationAdmin
public boolean isOrganizationAdmin(long organizationId)
isOrganizationOwner
public boolean isOrganizationOwner(long organizationId)
addTeamRoles
protected void addTeamRoles(long userId,
com.liferay.portal.kernel.model.Group group,
Set<Long> roleIds)
throws Exception
- Throws:
Exception
doCheckPermission
protected boolean doCheckPermission(long companyId,
long groupId,
String name,
String primKey,
long[] roleIds,
String actionId,
org.apache.commons.lang.time.StopWatch stopWatch)
throws Exception
- Throws:
Exception
doGetRoleIds
protected long[] doGetRoleIds(long userId,
long groupId)
throws Exception
- Throws:
Exception
getResources
protected List<com.liferay.portal.kernel.model.Resource> getResources(long companyId,
long groupId,
String name,
String primKey,
String actionId)
throws Exception
- Returns representations of the resource at each scope level.
For example, if the class name and primary key of a blog entry were
passed to this method, it would return a resource for the blog entry
itself (individual scope), a resource representing all blog entries
within its group (group scope), a resource standing for all blog entries
within a group the user has a suitable role in (group-template scope),
and a resource signifying all blog entries within the company (company
scope).
- Parameters:
companyId - the primary key of the companygroupId - the primary key of the group containing the resourcename - the resource's name, which can be either a class name or a
portlet IDprimKey - the primary key of the resourceactionId - unused
- Returns:
- representations of the resource at each scope level
- Throws:
Exception - if an exception occurred
hasGuestPermission
protected boolean hasGuestPermission(long groupId,
String name,
String primKey,
String actionId)
throws Exception
- Throws:
Exception
hasPermissionImpl
protected boolean hasPermissionImpl(long groupId,
String name,
String primKey,
long[] roleIds,
String actionId)
hasUserPermissionImpl
protected boolean hasUserPermissionImpl(long groupId,
String name,
String primKey,
long[] roleIds,
String actionId)
throws Exception
- Throws:
Exception
isCompanyAdminImpl
protected boolean isCompanyAdminImpl(long companyId)
throws Exception
- Throws:
Exception
isContentReviewerImpl
protected boolean isContentReviewerImpl(long groupId)
throws com.liferay.portal.kernel.exception.PortalException
- Throws:
com.liferay.portal.kernel.exception.PortalException
isContentReviewerImpl
protected boolean isContentReviewerImpl(long companyId,
long groupId)
throws Exception
- Throws:
Exception
isGroupAdminImpl
protected boolean isGroupAdminImpl(com.liferay.portal.kernel.model.Group group)
throws Exception
- Throws:
Exception
isGroupAdminImpl
protected boolean isGroupAdminImpl(long groupId)
throws Exception
- Throws:
Exception
isGroupMemberImpl
protected boolean isGroupMemberImpl(long groupId)
throws Exception
- Throws:
Exception
isGroupOwnerImpl
protected boolean isGroupOwnerImpl(com.liferay.portal.kernel.model.Group group)
throws com.liferay.portal.kernel.exception.PortalException
- Throws:
com.liferay.portal.kernel.exception.PortalException
isGroupOwnerImpl
protected boolean isGroupOwnerImpl(long groupId)
throws Exception
- Throws:
Exception
isOrganizationAdminImpl
protected boolean isOrganizationAdminImpl(long organizationId)
throws Exception
- Throws:
Exception
isOrganizationAdminImpl
protected boolean isOrganizationAdminImpl(com.liferay.portal.kernel.model.Organization organization)
throws com.liferay.portal.kernel.exception.PortalException
- Throws:
com.liferay.portal.kernel.exception.PortalException
isOrganizationOwnerImpl
protected boolean isOrganizationOwnerImpl(long organizationId)
throws Exception
- Throws:
Exception
isOrganizationOwnerImpl
protected boolean isOrganizationOwnerImpl(com.liferay.portal.kernel.model.Organization organization)
throws com.liferay.portal.kernel.exception.PortalException
- Throws:
com.liferay.portal.kernel.exception.PortalException
logHasUserPermission
protected void logHasUserPermission(long groupId,
String name,
String primKey,
String actionId,
org.apache.commons.lang.time.StopWatch stopWatch,
int block)