com.liferay.portal.security.permission
Class AdvancedPermissionChecker
java.lang.Object
com.liferay.portal.security.permission.BasePermissionChecker
com.liferay.portal.security.permission.AdvancedPermissionChecker
- All Implemented Interfaces:
- PermissionChecker
public class AdvancedPermissionChecker
- extends BasePermissionChecker
Method Summary |
protected void |
addRequiredMemberRole(Group group,
List<Role> roles)
|
protected void |
addTeamRoles(long userId,
Group group,
List<Role> roles)
|
PermissionCheckerBag |
getGuestUserBag()
|
protected List<Resource> |
getResources(long companyId,
long groupId,
String name,
String primKey,
String actionId)
|
long[] |
getRoleIds(long userId,
long groupId)
|
PermissionCheckerBag |
getUserBag(long userId,
long groupId)
|
protected List<Organization> |
getUserOrgs(long userId)
|
protected boolean |
hasGuestPermission(long groupId,
String name,
String primKey,
String actionId)
|
boolean |
hasOwnerPermission(long companyId,
String name,
String primKey,
long ownerId,
String actionId)
|
boolean |
hasPermission(long groupId,
String name,
String primKey,
String actionId)
|
protected boolean |
hasPermissionImpl(long groupId,
String name,
String primKey,
String actionId)
|
boolean |
hasUserPermission(long groupId,
String name,
String primKey,
String actionId,
boolean checkAdmin)
|
protected boolean |
hasUserPermissionImpl(long groupId,
String name,
String primKey,
String actionId,
boolean checkAdmin)
|
boolean |
isCommunityAdmin(long groupId)
|
protected boolean |
isCommunityAdminImpl(long groupId)
|
boolean |
isCommunityOwner(long groupId)
|
protected boolean |
isCommunityOwnerImpl(long groupId)
|
boolean |
isCompanyAdmin()
|
boolean |
isCompanyAdmin(long companyId)
|
protected boolean |
isCompanyAdminImpl()
|
protected boolean |
isCompanyAdminImpl(long companyId)
|
protected void |
logHasUserPermission(long groupId,
String name,
String primKey,
String actionId,
org.apache.commons.lang.time.StopWatch stopWatch,
int block)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
RESULTS_SEPARATOR
protected static final String RESULTS_SEPARATOR
- Deprecated.
- See Also:
- Constant Field Values
companyAdmins
protected Map<Long,Boolean> companyAdmins
AdvancedPermissionChecker
public AdvancedPermissionChecker()
getRoleIds
public long[] getRoleIds(long userId,
long groupId)
- Specified by:
getRoleIds
in interface PermissionChecker
- Overrides:
getRoleIds
in class BasePermissionChecker
getGuestUserBag
public PermissionCheckerBag getGuestUserBag()
throws Exception
- Throws:
Exception
getUserBag
public PermissionCheckerBag getUserBag(long userId,
long groupId)
throws Exception
- Throws:
Exception
hasOwnerPermission
public boolean hasOwnerPermission(long companyId,
String name,
String primKey,
long ownerId,
String actionId)
hasPermission
public boolean hasPermission(long groupId,
String name,
String primKey,
String actionId)
hasUserPermission
public boolean hasUserPermission(long groupId,
String name,
String primKey,
String actionId,
boolean checkAdmin)
isCommunityAdmin
public boolean isCommunityAdmin(long groupId)
isCommunityOwner
public boolean isCommunityOwner(long groupId)
isCompanyAdmin
public boolean isCompanyAdmin()
isCompanyAdmin
public boolean isCompanyAdmin(long companyId)
addRequiredMemberRole
protected void addRequiredMemberRole(Group group,
List<Role> roles)
throws Exception
- Throws:
Exception
addTeamRoles
protected void addTeamRoles(long userId,
Group group,
List<Role> roles)
throws Exception
- Throws:
Exception
getResources
protected List<Resource> getResources(long companyId,
long groupId,
String name,
String primKey,
String actionId)
throws Exception
- Throws:
Exception
getUserOrgs
protected List<Organization> getUserOrgs(long userId)
throws Exception
- Throws:
Exception
hasGuestPermission
protected boolean hasGuestPermission(long groupId,
String name,
String primKey,
String actionId)
throws Exception
- Throws:
Exception
hasPermissionImpl
protected boolean hasPermissionImpl(long groupId,
String name,
String primKey,
String actionId)
hasUserPermissionImpl
protected boolean hasUserPermissionImpl(long groupId,
String name,
String primKey,
String actionId,
boolean checkAdmin)
throws Exception
- Throws:
Exception
isCommunityAdminImpl
protected boolean isCommunityAdminImpl(long groupId)
throws Exception
- Throws:
Exception
isCommunityOwnerImpl
protected boolean isCommunityOwnerImpl(long groupId)
throws Exception
- Throws:
Exception
isCompanyAdminImpl
protected boolean isCompanyAdminImpl()
throws Exception
- Throws:
Exception
isCompanyAdminImpl
protected boolean isCompanyAdminImpl(long companyId)
throws Exception
- Throws:
Exception
logHasUserPermission
protected void logHasUserPermission(long groupId,
String name,
String primKey,
String actionId,
org.apache.commons.lang.time.StopWatch stopWatch,
int block)