|
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
public abstract class BasePermissionChecker
| Field Summary | |
|---|---|
protected boolean |
checkGuest
|
protected long |
defaultUserId
|
protected Boolean |
omniadmin
|
protected Role |
ownerRole
|
protected boolean |
signedIn
|
protected User |
user
|
| Fields inherited from interface com.liferay.portal.security.permission.PermissionChecker |
|---|
DEFAULT_ROLE_IDS |
| Constructor Summary | |
|---|---|
BasePermissionChecker()
|
|
| Method Summary | |
|---|---|
abstract PermissionChecker |
clone()
|
long |
getCompanyId()
Returns the primary key of the user's company. |
List<Long> |
getOwnerResourceBlockIds(long companyId,
long groupId,
String name,
String actionId)
|
long |
getOwnerRoleId()
Returns the primary key of the owner role. |
List<Long> |
getResourceBlockIds(long companyId,
long groupId,
long userId,
String name,
String actionId)
|
long[] |
getRoleIds(long userId,
long groupId)
Returns the primary keys of the roles the user has within the group. |
User |
getUser()
|
long |
getUserId()
Returns the primary key of the user. |
boolean |
hasOwnerPermission(long companyId,
String name,
long 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,
long primKey,
String actionId)
Returns true if the user has permission to perform the
action on the resource. |
void |
init(User user)
Initializes this permission checker. |
boolean |
isCheckGuest()
Returns true if guest permissions will be used in permission
checks. |
boolean |
isCommunityAdmin(long groupId)
Deprecated. As of 6.1.0, renamed to PermissionChecker.isGroupAdmin(long) |
boolean |
isCommunityOwner(long groupId)
Deprecated. As of 6.1.0, renamed to PermissionChecker.isGroupOwner(long) |
boolean |
isOmniadmin()
Returns true if the user is a universal administrator. |
boolean |
isSignedIn()
Returns true if the user is signed in. |
void |
resetValues()
Deprecated. As of 7.0.0 |
void |
setValues(PortletRequest portletRequest)
Deprecated. As of 7.0.0 |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.liferay.portal.security.permission.PermissionChecker |
|---|
getUserBag, hasOwnerPermission, hasPermission, hasUserPermission, isCompanyAdmin, isCompanyAdmin, isContentReviewer, isGroupAdmin, isGroupMember, isGroupOwner, isOrganizationAdmin, isOrganizationOwner |
| Field Detail |
|---|
protected boolean checkGuest
protected long defaultUserId
protected Boolean omniadmin
protected Role ownerRole
protected boolean signedIn
protected User user
| Constructor Detail |
|---|
public BasePermissionChecker()
| Method Detail |
|---|
public abstract PermissionChecker clone()
clone in interface PermissionCheckerclone in class Objectpublic long getCompanyId()
PermissionChecker
getCompanyId in interface PermissionChecker
public List<Long> getOwnerResourceBlockIds(long companyId,
long groupId,
String name,
String actionId)
getOwnerResourceBlockIds in interface PermissionCheckerpublic long getOwnerRoleId()
PermissionChecker
getOwnerRoleId in interface PermissionChecker
public List<Long> getResourceBlockIds(long companyId,
long groupId,
long userId,
String name,
String actionId)
getResourceBlockIds in interface PermissionChecker
public long[] getRoleIds(long userId,
long groupId)
PermissionChecker
getRoleIds in interface PermissionCheckeruserId - the primary key of the usergroupId - the primary key of the group
public User getUser()
getUser in interface PermissionCheckerpublic long getUserId()
PermissionChecker
getUserId in interface PermissionChecker
public boolean hasOwnerPermission(long companyId,
String name,
long primKey,
long ownerId,
String actionId)
PermissionCheckertrue if the user is the owner of the resource and
has permission to perform the action.
hasOwnerPermission in interface PermissionCheckercompanyId - 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,
long primKey,
String actionId)
PermissionCheckertrue if the user has permission to perform the
action on the resource.
hasPermission in interface PermissionCheckergroupId - 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 otherwisepublic void init(User user)
PermissionChecker
init in interface PermissionCheckeruser - the current userpublic boolean isCheckGuest()
PermissionCheckertrue if guest permissions will be used in permission
checks.
isCheckGuest in interface PermissionCheckertrue if guest permissions will be used in permission
checks; false otherwise@Deprecated public boolean isCommunityAdmin(long groupId)
PermissionChecker.isGroupAdmin(long)
isCommunityAdmin in interface PermissionChecker@Deprecated public boolean isCommunityOwner(long groupId)
PermissionChecker.isGroupOwner(long)
isCommunityOwner in interface PermissionCheckerpublic boolean isOmniadmin()
PermissionCheckertrue if the user is a universal administrator.
isOmniadmin in interface PermissionCheckertrue if the user is a universal administrator;
false otherwiseOmniadminUtilpublic boolean isSignedIn()
PermissionCheckertrue if the user is signed in.
isSignedIn in interface PermissionCheckertrue if the user is signed in; false
otherwise@Deprecated public void resetValues()
resetValues in interface PermissionChecker@Deprecated public void setValues(PortletRequest portletRequest)
setValues in interface PermissionChecker
|
Liferay 7.0-ce-b4 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||