|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.security.permission.BasePermissionChecker
com.liferay.portal.security.permission.SimplePermissionChecker
public class SimplePermissionChecker
| Field Summary |
|---|
| Fields inherited from class com.liferay.portal.security.permission.BasePermissionChecker |
|---|
checkGuest, defaultUserId, omniadmin, ownerRole, signedIn, user |
| Fields inherited from interface com.liferay.portal.security.permission.PermissionChecker |
|---|
DEFAULT_ROLE_IDS |
| Constructor Summary | |
|---|---|
SimplePermissionChecker()
|
|
| Method Summary | |
|---|---|
SimplePermissionChecker |
clone()
|
UserBag |
getUserBag()
|
boolean |
hasOwnerPermission(long companyId,
String name,
String primKey,
long ownerId,
String actionId)
Returns true if the user is the owner of the resource and
has permission to perform the action. |
boolean |
hasPermission(long groupId,
String name,
String primKey,
String actionId)
Returns true if the user has permission to perform the
action on the resource. |
protected boolean |
hasPermission(String actionId)
|
boolean |
hasUserPermission(long groupId,
String name,
String primKey,
String actionId,
boolean checkAdmin)
Returns true if the user has permission to perform the
action on the resource without using guest permissions. |
boolean |
isCompanyAdmin()
Returns true if the user is an administrator of their
company. |
boolean |
isCompanyAdmin(long companyId)
Returns true if the user is an administrator of the company. |
boolean |
isContentReviewer(long companyId,
long groupId)
Returns true if the user is a content reviewer or has
sufficient permissions to review content (i.e. the user is a company or
group administrator). |
boolean |
isGroupAdmin(long groupId)
Returns true if the user is an administrator of the group. |
boolean |
isGroupMember(long groupId)
Returns true if the user is a member of the group. |
boolean |
isGroupOwner(long groupId)
Returns true if the user is the owner of the group. |
boolean |
isOrganizationAdmin(long organizationId)
Returns true if the user is an administrator of the
organization. |
boolean |
isOrganizationOwner(long organizationId)
Returns true if the user is an owner of the organization. |
| Methods inherited from class com.liferay.portal.security.permission.BasePermissionChecker |
|---|
getCompanyId, getOwnerResourceBlockIds, getOwnerRoleId, getResourceBlockIds, getRoleIds, getUser, getUserId, hasOwnerPermission, hasPermission, init, isCheckGuest, isCommunityAdmin, isCommunityOwner, isOmniadmin, isSignedIn, resetValues, setValues |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SimplePermissionChecker()
| Method Detail |
|---|
public SimplePermissionChecker clone()
clone in interface PermissionCheckerclone in class BasePermissionCheckerpublic UserBag getUserBag()
public boolean hasOwnerPermission(long companyId,
String name,
String primKey,
long ownerId,
String actionId)
PermissionCheckertrue if the user is the owner of the resource and
has permission to perform the action.
companyId - the primary key of the user's companyname - the resource's name, which can be either a class name or a
portlet IDprimKey - the primary key of the resourceownerId - the primary key of the resource's owneractionId - the action ID
true if the user is the owner of the resource and
has permission to perform the action; false
otherwise
public boolean hasPermission(long groupId,
String name,
String primKey,
String actionId)
PermissionCheckertrue if the user has permission to perform the
action on the resource.
groupId - 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 - the action ID
true if the user has permission to perform the
action on the resource; false otherwise
public boolean hasUserPermission(long groupId,
String name,
String primKey,
String actionId,
boolean checkAdmin)
PermissionCheckertrue if the user has permission to perform the
action on the resource without using guest permissions.
groupId - 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 - the action IDcheckAdmin - whether to use permissions gained from administrator
roles
true if the user has permission to perform the
action on the resource without using guest permissions;
false otherwisepublic boolean isCompanyAdmin()
PermissionCheckertrue if the user is an administrator of their
company.
true if the user is an administrator of their
company; false otherwisepublic boolean isCompanyAdmin(long companyId)
PermissionCheckertrue if the user is an administrator of the company.
companyId - the primary key of the company
true if the user is an administrator of the company;
false otherwise
public boolean isContentReviewer(long companyId,
long groupId)
PermissionCheckertrue if the user is a content reviewer or has
sufficient permissions to review content (i.e. the user is a company or
group administrator).
companyId - the primary key of the companygroupId - the primary key of the group
true if the user is a reviewer or has sufficient
permissions to review content; false otherwisepublic boolean isGroupAdmin(long groupId)
PermissionCheckertrue if the user is an administrator of the group.
groupId - the primary key of the group
true if the user is an administrator of the group;
false otherwisepublic boolean isGroupMember(long groupId)
PermissionCheckertrue if the user is a member of the group.
groupId - the primary key of the group
true if the user is a member of the group;
false otherwisepublic boolean isGroupOwner(long groupId)
PermissionCheckertrue if the user is the owner of the group.
groupId - the primary key of the group
true if the user is the owner of the group;
false otherwisepublic boolean isOrganizationAdmin(long organizationId)
PermissionCheckertrue if the user is an administrator of the
organization.
organizationId - the primary key of the organization
true if the user is an administrator of the
organization; false otherwisepublic boolean isOrganizationOwner(long organizationId)
PermissionCheckertrue if the user is an owner of the organization.
organizationId - the primary key of the organization
true if the user is an owner of the organization;
false otherwiseprotected boolean hasPermission(String actionId)
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||