Package org.exoplatform.portal.config
Class UserACL
java.lang.Object
org.exoplatform.portal.config.UserACL
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAclPlugin(AclPlugin aclPlugin) voidgetAclPlugin(String objectType) org.exoplatform.services.security.Authenticatororg.exoplatform.services.security.IdentityRegistryorg.exoplatform.services.security.IdentitygetUserIdentity(String username) Retrieves the User ACLIdentityfrom Registry, else build it fromOrganizationServiceusingAuthenticator.createIdentity(String)booleanhasAccessPermission(String objectType, String objectId, String username) booleanhasAccessPermission(String objectType, String objectId, org.exoplatform.services.security.Identity identity) booleanhasAccessPermission(org.exoplatform.portal.config.model.Page page, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas access permission on designated Page or notbooleanhasAccessPermission(org.exoplatform.portal.config.model.PortalConfig portalConfig, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas access permission on designated Site or notbooleanhasAccessPermission(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas access permission on designated Page or notbooleanhasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, String[] expressions) booleanhasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, List<String> expressions) booleanhasAccessPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, Stream<String> expressionsStream) booleanhasCreatePortalPermission(org.exoplatform.services.security.Identity identity) Check whether the designatedIdentityhas permissions to create a new Site of type PORTALbooleanhasDeletePermission(String objectType, String objectId, String username) booleanhasDeletePermission(String objectType, String objectId, org.exoplatform.services.security.Identity identity) booleanhasEditPermission(String objectType, String objectId, String username) booleanhasEditPermission(String objectType, String objectId, org.exoplatform.services.security.Identity identity) booleanhasEditPermission(org.exoplatform.portal.config.model.Page page, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas edit permission on designatedPageor notbooleanhasEditPermission(org.exoplatform.portal.config.model.PortalConfig portalConfig, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas edit permission on designatedPortalConfigor notbooleanhasEditPermission(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas edit permission on designatedPageContextor notbooleanhasEditPermission(org.exoplatform.services.security.Identity identity, String ownerType, String ownerId, String expression) booleanhasPermission(String objectType, String objectId, String permissionType, String username) booleanhasPermission(String objectType, String objectId, String permissionType, org.exoplatform.services.security.Identity identity) booleanhasPermission(org.exoplatform.services.security.Identity identity, String expression) booleanhasPermission(org.exoplatform.services.security.Identity identity, String[] expressions) booleanhasPermission(org.exoplatform.services.security.Identity identity, String membershipType, String groupId) booleanhasPermission(org.exoplatform.services.security.Identity identity, org.exoplatform.services.organization.Group group, String pluginId) booleanisAdministrator(org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityis a super administrator or a member of manager:/platform/administratorsbooleanisAnonymousUser(String username) booleanisAnonymousUser(org.exoplatform.services.security.Identity identity) booleanisGuestsGroup(String groupId) booleanisMemberOf(org.exoplatform.services.security.Identity identity, String expression) Checks whether user is member of a groupId or membershipType:groupIdbooleanisMemberOf(org.exoplatform.services.security.Identity identity, String membershipType, String groupId) booleanisSuperUser(org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityis the super user of platform or notbooleanisUserInGroup(org.exoplatform.services.security.Identity identity, String group) Checks whether the designatedIdentitybelongs to a designated group or not
-
Field Details
-
EVERYONE
- See Also:
-
-
Constructor Details
-
UserACL
public UserACL(org.exoplatform.container.xml.InitParams params)
-
-
Method Details
-
addGroupVisibilityPlugin
-
hasPermission
public boolean hasPermission(org.exoplatform.services.security.Identity identity, org.exoplatform.services.organization.Group group, String pluginId) -
getUserIdentity
Retrieves the User ACLIdentityfrom Registry, else build it fromOrganizationServiceusingAuthenticator.createIdentity(String)- Parameters:
username-- Returns:
-
isSuperUser
public boolean isSuperUser(org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityis the super user of platform or not- Returns:
- true if super user, else false
-
isAdministrator
public boolean isAdministrator(org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityis a super administrator or a member of manager:/platform/administrators- Parameters:
identity-Identityto check- Returns:
- true if is an administrator, else false
-
hasCreatePortalPermission
public boolean hasCreatePortalPermission(org.exoplatform.services.security.Identity identity) Check whether the designatedIdentityhas permissions to create a new Site of type PORTAL- Parameters:
identity-Identity- Returns:
- true if has site creation permission else false
-
hasEditPermission
public boolean hasEditPermission(org.exoplatform.portal.config.model.PortalConfig portalConfig, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas edit permission on designatedPortalConfigor not- Parameters:
portalConfig-identity-- Returns:
- true if have edit permission else false
-
hasEditPermission
public boolean hasEditPermission(org.exoplatform.portal.config.model.Page page, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas edit permission on designatedPageor not- Parameters:
page-identity-- Returns:
- true if have edit permission else false
-
hasEditPermission
public boolean hasEditPermission(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas edit permission on designatedPageContextor not- Parameters:
pageContext-identity-- Returns:
- true if have edit permission else false
-
hasAccessPermission
public boolean hasAccessPermission(org.exoplatform.portal.config.model.PortalConfig portalConfig, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas access permission on designated Site or not- Parameters:
portalConfig-identity-- Returns:
- true if have access permission else false
-
hasAccessPermission
public boolean hasAccessPermission(org.exoplatform.portal.config.model.Page page, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas access permission on designated Page or not- Parameters:
page-identity-- Returns:
- true if have access permission else false
-
hasAccessPermission
public boolean hasAccessPermission(org.exoplatform.portal.mop.page.PageContext pageContext, org.exoplatform.services.security.Identity identity) Checks whether a designatedIdentityhas access permission on designated Page or not- Parameters:
pageContext-identity-- Returns:
- true if have access permission else false
-
isUserInGroup
Checks whether the designatedIdentitybelongs to a designated group or not- Parameters:
identity-Identitygroup- groupId- Returns:
- true if has an associated memberdshipType with this group else false
-
hasPermission
public boolean hasPermission(org.exoplatform.services.security.Identity identity, String[] expressions) -
hasPermission
public boolean hasPermission(org.exoplatform.services.security.Identity identity, String expression) -
hasPermission
-
isMemberOf
Checks whether user is member of a groupId or membershipType:groupId- Parameters:
identity-Identityto checkexpression- permission expression of type groupId or membershipType:groupId- Returns:
- true if is member, else false
-
isMemberOf
-
hasEditPermission
-
hasAccessPermission
-
hasAccessPermission
-
hasAccessPermission
-
isGuestsGroup
-
isAnonymousUser
public boolean isAnonymousUser(org.exoplatform.services.security.Identity identity) -
isAnonymousUser
-
hasAccessPermission
-
hasAccessPermission
-
hasEditPermission
-
hasEditPermission
-
hasDeletePermission
-
hasDeletePermission
-
hasPermission
-
hasPermission
-
addAclPlugin
-
getAclPlugin
-
getAuthenticator
public org.exoplatform.services.security.Authenticator getAuthenticator() -
getIdentityRegistry
public org.exoplatform.services.security.IdentityRegistry getIdentityRegistry()
-