Class UserAclPlugin
java.lang.Object
io.meeds.social.user.plugin.UserAclPlugin
- All Implemented Interfaces:
io.meeds.portal.plugin.AclPlugin
-
Field Summary
FieldsFields inherited from interface io.meeds.portal.plugin.AclPlugin
DELETE_PERMISSION_TYPE, EDIT_PERMISSION_TYPE, VIEW_PERMISSION_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetGuestVisibleGroupIds(org.exoplatform.services.security.Identity identity) The groups through which a guest sees other users under theVIEWrule of this plugin: the space groups of theirUserACLidentity, memberships inherited through a nested-group link included.booleanhasPermission(String objectId, String permissionType, org.exoplatform.services.security.Identity identity) TheVIEWrule, checked in this order: an administrator; the target themself; a shared group, only a space group for a guest viewer (isGuest(Identity)) and any group butSpaceUtils.PLATFORM_EXTERNALS_GROUPfor any other viewer; a confirmed connection, read last so that a viewer sharing a group with the target causes no relationship read.voidinit()static booleanisGuest(org.exoplatform.services.security.Identity identity) Whether a viewer is a guest: theirUserACLidentity holds a membership ofSpaceUtils.PLATFORM_EXTERNALS_GROUP.
-
Field Details
-
OBJECT_TYPE
- See Also:
-
-
Constructor Details
-
UserAclPlugin
public UserAclPlugin()
-
-
Method Details
-
init
@PostConstruct public void init() -
getObjectType
- Specified by:
getObjectTypein interfaceio.meeds.portal.plugin.AclPlugin
-
isGuest
public static boolean isGuest(org.exoplatform.services.security.Identity identity) Whether a viewer is a guest: theirUserACLidentity holds a membership ofSpaceUtils.PLATFORM_EXTERNALS_GROUP. The membership is the authority, not the profile'sexternalproperty derived from a direct membership only.- Parameters:
identity- the viewer'sUserACLidentity, may be null- Returns:
- true for a guest
-
getGuestVisibleGroupIds
public static List<String> getGuestVisibleGroupIds(org.exoplatform.services.security.Identity identity) The groups through which a guest sees other users under theVIEWrule of this plugin: the space groups of theirUserACLidentity, memberships inherited through a nested-group link included. The People Directory builds its guest restriction from this set, so that the directory and the profile pages apply one rule.- Parameters:
identity- the guest'sUserACLidentity, may be null- Returns:
- the space group ids, never null
-
hasPermission
public boolean hasPermission(String objectId, String permissionType, org.exoplatform.services.security.Identity identity) TheVIEWrule, checked in this order: an administrator; the target themself; a shared group, only a space group for a guest viewer (isGuest(Identity)) and any group butSpaceUtils.PLATFORM_EXTERNALS_GROUPfor any other viewer; a confirmed connection, read last so that a viewer sharing a group with the target causes no relationship read.- Specified by:
hasPermissionin interfaceio.meeds.portal.plugin.AclPlugin
-