|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PermissionChecker
Field Summary | |
---|---|
static long[] |
DEFAULT_ROLE_IDS
|
Method Summary | |
---|---|
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 |
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,
long primKey,
String actionId)
Returns true if the user has permission to perform the
action on the resource. |
boolean |
hasPermission(long groupId,
String name,
String primKey,
String actionId)
Returns true if the user has permission to perform the
action on the resource. |
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. |
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 isGroupAdmin(long) |
boolean |
isCommunityOwner(long groupId)
Deprecated. As of 6.1.0, renamed to isGroupOwner(long) |
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 |
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 |
isOmniadmin()
Returns true if the user is a universal administrator. |
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. |
boolean |
isSignedIn()
Returns true if the user is signed in. |
void |
resetValues()
Deprecated. Does nothing |
void |
setValues(PortletRequest portletRequest)
Deprecated. Does nothing |
Field Detail |
---|
static final long[] DEFAULT_ROLE_IDS
Method Detail |
---|
PermissionChecker clone()
long getCompanyId()
List<Long> getGuestResourceBlockIds(long companyId, long groupId, String name, String actionId)
List<Long> getOwnerResourceBlockIds(long companyId, long groupId, String name, String actionId)
long getOwnerRoleId()
List<Long> getResourceBlockIds(long companyId, long groupId, long userId, String name, String actionId)
long[] getRoleIds(long userId, long groupId)
userId
- the primary key of the usergroupId
- the primary key of the group
long getUserId()
boolean hasOwnerPermission(long companyId, String name, long primKey, long ownerId, String actionId)
true
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
otherwiseboolean hasOwnerPermission(long companyId, String name, String primKey, long ownerId, String actionId)
true
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
otherwiseboolean hasPermission(long groupId, String name, long primKey, String actionId)
true
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
otherwiseboolean hasPermission(long groupId, String name, String primKey, String actionId)
true
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
otherwiseboolean hasUserPermission(long groupId, String name, String primKey, String actionId, boolean checkAdmin)
true
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
otherwisevoid init(User user)
user
- the current userboolean isCheckGuest()
true
if guest permissions will be used in permission
checks.
true
if guest permissions will be used in permission
checks; false
otherwiseboolean isCommunityAdmin(long groupId)
isGroupAdmin(long)
boolean isCommunityOwner(long groupId)
isGroupOwner(long)
boolean isCompanyAdmin()
true
if the user is an administrator of their
company.
true
if the user is an administrator of their
company; false
otherwiseboolean isCompanyAdmin(long companyId)
true
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
otherwiseboolean isGroupAdmin(long groupId)
true
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
otherwiseboolean isGroupMember(long groupId)
true
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
otherwiseboolean isGroupOwner(long groupId)
true
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
otherwiseboolean isOmniadmin()
true
if the user is a universal administrator.
true
if the user is a universal administrator;
false
otherwiseOmniadminUtil
boolean isOrganizationAdmin(long organizationId)
true
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
otherwiseboolean isOrganizationOwner(long organizationId)
true
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
otherwiseboolean isSignedIn()
true
if the user is signed in.
true
if the user is signed in; false
otherwisevoid resetValues()
void setValues(PortletRequest portletRequest)
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |