public class AdvancedPermissionChecker extends BasePermissionChecker
| Modifier and Type | Field and Description |
|---|---|
protected static String |
RESULTS_SEPARATOR
Deprecated.
As of Bunyan (6.0.x)
|
checkGuest, defaultUserId, omniadmin, ownerRole, signedIn, user| Constructor and Description |
|---|
AdvancedPermissionChecker() |
| Modifier and Type | Method and Description |
|---|---|
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) |
protected List<com.liferay.portal.kernel.model.Resource> |
fixMissingResources(long companyId,
long groupId,
String name,
String primKey,
String actionId,
List<com.liferay.portal.kernel.model.Resource> resources) |
com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag |
getGuestResourceBlockIdsBag(long companyId,
long groupId,
String name)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
long[] |
getGuestUserRoleIds() |
List<Long> |
getOwnerResourceBlockIds(long companyId,
long groupId,
String name,
String actionId)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag |
getOwnerResourceBlockIdsBag(long companyId,
long groupId,
String name)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
List<Long> |
getResourceBlockIds(long companyId,
long groupId,
long userId,
String name,
String actionId)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag |
getResourceBlockIdsBag(long companyId,
long groupId,
String name,
long[] roleIds)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
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)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
boolean |
hasOwnerPermission(long companyId,
String name,
String primKey,
long ownerId,
String actionId) |
boolean |
hasPermission(com.liferay.portal.kernel.model.Group group,
String name,
String primKey,
String actionId) |
protected boolean |
hasPermissionImpl(long groupId,
String name,
String primKey,
long[] roleIds,
String actionId)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
protected boolean |
hasUserPermissionImpl(long groupId,
String name,
String primKey,
long[] roleIds,
String actionId)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
void |
init(com.liferay.portal.kernel.model.User user) |
void |
init(com.liferay.portal.kernel.model.User user,
com.liferay.portal.kernel.security.permission.contributor.RoleContributor[] roleContributors) |
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)
Deprecated.
As of Judson (7.1.x), with no direct replacement
|
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) |
getCompanyId, getOwnerRoleId, getPermissionChecksMap, getUser, getUserId, hasOwnerPermission, hasPermission, hasPermission, hasPermission, isCheckGuest, isOmniadmin, isSignedIn@Deprecated protected static final String RESULTS_SEPARATOR
public AdvancedPermissionChecker clone()
clone in interface com.liferay.portal.kernel.security.permission.PermissionCheckerclone in class BasePermissionChecker@Deprecated
public com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag getGuestResourceBlockIdsBag(long companyId,
long groupId,
String name)
throws Exception
Exceptionpublic long[] getGuestUserRoleIds()
getGuestUserRoleIds in interface com.liferay.portal.kernel.security.permission.PermissionCheckergetGuestUserRoleIds in class BasePermissionChecker@Deprecated
public List<Long> getOwnerResourceBlockIds(long companyId,
long groupId,
String name,
String actionId)
getOwnerResourceBlockIds in interface com.liferay.portal.kernel.security.permission.PermissionCheckergetOwnerResourceBlockIds in class BasePermissionChecker@Deprecated
public com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag getOwnerResourceBlockIdsBag(long companyId,
long groupId,
String name)
@Deprecated
public List<Long> getResourceBlockIds(long companyId,
long groupId,
long userId,
String name,
String actionId)
getResourceBlockIds in interface com.liferay.portal.kernel.security.permission.PermissionCheckergetResourceBlockIds in class BasePermissionChecker@Deprecated
public com.liferay.portal.kernel.security.permission.ResourceBlockIdsBag getResourceBlockIdsBag(long companyId,
long groupId,
String name,
long[] roleIds)
throws Exception
Exceptionpublic long[] getRoleIds(long userId,
long groupId)
getRoleIds in interface com.liferay.portal.kernel.security.permission.PermissionCheckergetRoleIds in class BasePermissionCheckerpublic com.liferay.portal.kernel.security.permission.UserBag getUserBag()
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic boolean hasOwnerPermission(long companyId,
String name,
String primKey,
long ownerId,
String actionId)
public boolean hasPermission(com.liferay.portal.kernel.model.Group group,
String name,
String primKey,
String actionId)
public void init(com.liferay.portal.kernel.model.User user)
init in interface com.liferay.portal.kernel.security.permission.PermissionCheckerinit in class BasePermissionCheckerpublic void init(com.liferay.portal.kernel.model.User user,
com.liferay.portal.kernel.security.permission.contributor.RoleContributor[] roleContributors)
public boolean isCompanyAdmin()
public boolean isCompanyAdmin(long companyId)
public boolean isContentReviewer(long companyId,
long groupId)
public boolean isGroupAdmin(long groupId)
public boolean isGroupMember(long groupId)
public boolean isGroupOwner(long groupId)
public boolean isOrganizationAdmin(long organizationId)
public boolean isOrganizationOwner(long organizationId)
protected void addTeamRoles(long userId,
com.liferay.portal.kernel.model.Group group,
Set<Long> roleIds)
throws Exception
Exceptionprotected boolean doCheckPermission(long companyId,
long groupId,
String name,
String primKey,
long[] roleIds,
String actionId,
org.apache.commons.lang.time.StopWatch stopWatch)
throws Exception
Exceptionprotected long[] doGetRoleIds(long userId,
long groupId)
throws Exception
Exceptionprotected List<com.liferay.portal.kernel.model.Resource> fixMissingResources(long companyId,
long groupId,
String name,
String primKey,
String actionId,
List<com.liferay.portal.kernel.model.Resource> resources)
throws Exception
Exceptionprotected List<com.liferay.portal.kernel.model.Resource> getResources(long companyId,
long groupId,
String name,
String primKey,
String actionId)
throws Exception
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).
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 - unusedException - if an exception occurred@Deprecated
protected boolean hasGuestPermission(long groupId,
String name,
String primKey,
String actionId)
throws Exception
Exception@Deprecated
protected boolean hasPermissionImpl(long groupId,
String name,
String primKey,
long[] roleIds,
String actionId)
@Deprecated
protected boolean hasUserPermissionImpl(long groupId,
String name,
String primKey,
long[] roleIds,
String actionId)
throws Exception
Exceptionprotected boolean isCompanyAdminImpl(long companyId)
throws Exception
Exceptionprotected boolean isContentReviewerImpl(long groupId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionprotected boolean isContentReviewerImpl(long companyId,
long groupId)
throws Exception
Exceptionprotected boolean isGroupAdminImpl(com.liferay.portal.kernel.model.Group group)
throws Exception
Exception@Deprecated
protected boolean isGroupAdminImpl(long groupId)
throws Exception
Exceptionprotected boolean isGroupMemberImpl(long groupId)
throws Exception
Exceptionprotected boolean isGroupOwnerImpl(com.liferay.portal.kernel.model.Group group)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionprotected boolean isGroupOwnerImpl(long groupId)
throws Exception
Exceptionprotected boolean isOrganizationAdminImpl(long organizationId)
throws Exception
Exceptionprotected boolean isOrganizationAdminImpl(com.liferay.portal.kernel.model.Organization organization)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionprotected boolean isOrganizationOwnerImpl(long organizationId)
throws Exception
Exceptionprotected boolean isOrganizationOwnerImpl(com.liferay.portal.kernel.model.Organization organization)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionprotected void logHasUserPermission(long groupId,
String name,
String primKey,
String actionId,
org.apache.commons.lang.time.StopWatch stopWatch,
int block)