|
Liferay 6.1.2-ce-ga3 | |||||||||
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> |
getGuestResourceBlockIds(long companyId,
long groupId,
String name,
String actionId)
|
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. |
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()
|
void |
setValues(PortletRequest portletRequest)
|
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 |
---|
hasOwnerPermission, hasPermission, hasUserPermission, isCompanyAdmin, isCompanyAdmin, 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 PermissionChecker
clone
in class Object
public long getCompanyId()
PermissionChecker
getCompanyId
in interface PermissionChecker
public List<Long> getGuestResourceBlockIds(long companyId, long groupId, String name, String actionId)
getGuestResourceBlockIds
in interface PermissionChecker
public List<Long> getOwnerResourceBlockIds(long companyId, long groupId, String name, String actionId)
getOwnerResourceBlockIds
in interface PermissionChecker
public 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 PermissionChecker
userId
- the primary key of the usergroupId
- the primary key of the group
public long getUserId()
PermissionChecker
getUserId
in interface PermissionChecker
public boolean hasOwnerPermission(long companyId, String name, long primKey, long ownerId, String actionId)
PermissionChecker
true
if the user is the owner of the resource and
has permission to perform the action.
hasOwnerPermission
in interface PermissionChecker
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
otherwisepublic boolean hasPermission(long groupId, String name, long primKey, String actionId)
PermissionChecker
true
if the user has permission to perform the
action on the resource.
hasPermission
in interface PermissionChecker
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
otherwisepublic void init(User user)
PermissionChecker
init
in interface PermissionChecker
user
- the current userpublic boolean isCheckGuest()
PermissionChecker
true
if guest permissions will be used in permission
checks.
isCheckGuest
in interface PermissionChecker
true
if guest permissions will be used in permission
checks; false
otherwisepublic boolean isCommunityAdmin(long groupId)
PermissionChecker.isGroupAdmin(long)
isCommunityAdmin
in interface PermissionChecker
public boolean isCommunityOwner(long groupId)
PermissionChecker.isGroupOwner(long)
isCommunityOwner
in interface PermissionChecker
public boolean isOmniadmin()
PermissionChecker
true
if the user is a universal administrator.
isOmniadmin
in interface PermissionChecker
true
if the user is a universal administrator;
false
otherwiseOmniadminUtil
public boolean isSignedIn()
PermissionChecker
true
if the user is signed in.
isSignedIn
in interface PermissionChecker
true
if the user is signed in; false
otherwisepublic void resetValues()
resetValues
in interface PermissionChecker
public void setValues(PortletRequest portletRequest)
setValues
in interface PermissionChecker
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |