Package org.ametys.core.right
Interface ProfileAssignmentStorage
-
- All Known Subinterfaces:
ModifiableProfileAssignmentStorage
- All Known Implementing Classes:
ACLAmetysObjectProfileAssignmentStorage
,JdbcProfileAssignmentStorage
,ModifiableACLAmetysObjectProfileAssignmentStorage
public interface ProfileAssignmentStorage
This interface is for read-only profile assignments storage
-
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_PRIORITY
Maximum priority.static int
MIN_PRIORITY
Minimum priority.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description Set<GroupIdentity>
getAllowedGroups(Object object, String profileId)
Gets the groups that have the given allowed profile on the given objectSet<String>
getAllowedProfilesForAnonymous(Object object)
Gets the allowed profiles an anonymous user has on the given objectSet<String>
getAllowedProfilesForAnyConnectedUser(Object object)
Gets the allowed profiles any connected user has on the given objectMap<GroupIdentity,Set<String>>
getAllowedProfilesForGroups(Object object)
Gets the groups that have allowed profiles assigned on the given objectSet<String>
getAllowedProfilesForUser(UserIdentity user, Object object)
Get the allowed profiles assigned on the given object for the given userMap<UserIdentity,Set<String>>
getAllowedProfilesForUsers(Object object)
Gets the users that have allowed profiles assigned on the given objectSet<UserIdentity>
getAllowedUsers(Object object, String profileId)
Gets the users that have the given allowed profile on the given objectSet<GroupIdentity>
getDeniedGroups(Object object, String profileId)
Gets the groups that have the given denied profile on the given objectSet<String>
getDeniedProfilesForAnonymous(Object object)
Gets the denied profiles an anonymous user has on the given objectSet<String>
getDeniedProfilesForAnyConnectedUser(Object object)
Gets the denied profiles any connected user has on the given objectMap<GroupIdentity,Set<String>>
getDeniedProfilesForGroups(Object object)
Gets the groups that have denied profiles assigned on the given objectSet<String>
getDeniedProfilesForUser(UserIdentity user, Object object)
Get the denied profiles assigned on the given object for the given userMap<UserIdentity,Set<String>>
getDeniedProfilesForUsers(Object object)
Gets the users that have denied profiles assigned on the given objectSet<UserIdentity>
getDeniedUsers(Object object, String profileId)
Gets the users that have the given denied profile on the given objectint
getPriority()
Returns the priority of this profile storage TheProfileAssignmentStorageExtensionPoint
will take the profile storage which supports the object with the highest priority to return the allowed/denied users/groupsboolean
hasAnonymousAllowedProfile(Set<? extends Object> rootContexts, Set<String> profileIds)
Returns true if anonymous user has the allowed profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmittedboolean
hasAnonymousDeniedProfile(Set<? extends Object> rootContexts, Set<String> profileIds)
Deprecated.This method used to be used byProfileAssignmentStorageExtensionPoint
but was proved to be useless and may be removed from the API in the future (see RUNTIME-2688).boolean
hasAnyConnectedAllowedProfile(Set<? extends Object> rootContexts, Set<String> profileIds)
Returns true if any connected user has the allowed profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmittedboolean
hasAnyConnectedDeniedProfile(Set<? extends Object> rootContexts, Set<String> profileIds)
Deprecated.This method used to be used byProfileAssignmentStorageExtensionPoint
but was proved to be useless and may be removed from the API in the future (see RUNTIME-2688).boolean
hasGroupAllowedProfile(Set<? extends Object> rootContexts, GroupIdentity group, Set<String> profileIds)
Returns true if group has the allowed profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmittedboolean
hasGroupDeniedProfile(Set<? extends Object> rootContexts, GroupIdentity group, Set<String> profileIds)
Deprecated.This method used to be used byProfileAssignmentStorageExtensionPoint
but was proved to be useless and may be removed from the API in the future (see RUNTIME-2688).boolean
hasUserAllowedProfile(Set<? extends Object> rootContexts, UserIdentity user, Set<String> profileIds)
Returns true if user has the allowed profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmittedboolean
hasUserDeniedProfile(Set<? extends Object> rootContexts, UserIdentity user, Set<String> profileIds)
Deprecated.This method used to be used byProfileAssignmentStorageExtensionPoint
but was proved to be useless and may be removed from the API in the future (see RUNTIME-2688).boolean
isAnonymousAllowed(Object object, String profileId)
Returns true if anonymous is allowed with the given profileboolean
isAnonymousDenied(Object object, String profileId)
Returns true if anonymous is denied with the given profileboolean
isAnyConnectedUserAllowed(Object object, String profileId)
Returns true if any connected user is allowed with the given profileboolean
isAnyConnectedUserDenied(Object object, String profileId)
Returns true if any connected user is denied with the given profileboolean
isInheritanceDisallowed(Object object)
Returns true if the inheritance of permissions is disallowed on the given objectboolean
isRootContextSupported(Object rootContext)
Returns true if this profile storage supports the given object as a root context i.e.boolean
isSupported(Object object)
Returns true if this profile storage supports the given object, i.e.
-
-
-
Field Detail
-
MIN_PRIORITY
static final int MIN_PRIORITY
Minimum priority.- See Also:
- Constant Field Values
-
MAX_PRIORITY
static final int MAX_PRIORITY
Maximum priority.- See Also:
- Constant Field Values
-
-
Method Detail
-
hasAnonymousDeniedProfile
@Deprecated boolean hasAnonymousDeniedProfile(Set<? extends Object> rootContexts, Set<String> profileIds)
Deprecated.This method used to be used byProfileAssignmentStorageExtensionPoint
but was proved to be useless and may be removed from the API in the future (see RUNTIME-2688).Returns true if anonymous user has the denied profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmitted- Parameters:
rootContexts
- The root contexts to search rights forprofileIds
- The ids of the profiles- Returns:
- true if any connected user has a permission on at least one object supported by this profile assignment storage, given some groups and profiles
-
hasAnonymousAllowedProfile
boolean hasAnonymousAllowedProfile(Set<? extends Object> rootContexts, Set<String> profileIds)
Returns true if anonymous user has the allowed profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmitted- Parameters:
rootContexts
- The root contexts to search rights forprofileIds
- The ids of the profiles- Returns:
- true if any connected user has a permission on at least one object supported by this profile assignment storage, given some groups and profiles
-
hasAnyConnectedDeniedProfile
@Deprecated boolean hasAnyConnectedDeniedProfile(Set<? extends Object> rootContexts, Set<String> profileIds)
Deprecated.This method used to be used byProfileAssignmentStorageExtensionPoint
but was proved to be useless and may be removed from the API in the future (see RUNTIME-2688).Returns true if any connected user has the denied profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmitted- Parameters:
rootContexts
- The root contexts to search rights forprofileIds
- The ids of the profiles- Returns:
- true if any connected user has a permission on at least one object supported by this profile assignment storage, given some groups and profiles
-
hasAnyConnectedAllowedProfile
boolean hasAnyConnectedAllowedProfile(Set<? extends Object> rootContexts, Set<String> profileIds)
Returns true if any connected user has the allowed profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmitted- Parameters:
rootContexts
- The root contexts to search rights forprofileIds
- The ids of the profiles- Returns:
- true if any connected user has a permission on at least one object supported by this profile assignment storage, given some groups and profiles
-
hasUserDeniedProfile
@Deprecated boolean hasUserDeniedProfile(Set<? extends Object> rootContexts, UserIdentity user, Set<String> profileIds)
Deprecated.This method used to be used byProfileAssignmentStorageExtensionPoint
but was proved to be useless and may be removed from the API in the future (see RUNTIME-2688).Returns true if user has the denied profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmitted- Parameters:
rootContexts
- The root contexts to search rights foruser
- The user to testprofileIds
- The ids of the profiles- Returns:
- true if any connected user has a permission on at least one object supported by this profile assignment storage, given some groups and profiles
-
hasUserAllowedProfile
boolean hasUserAllowedProfile(Set<? extends Object> rootContexts, UserIdentity user, Set<String> profileIds)
Returns true if user has the allowed profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmitted- Parameters:
rootContexts
- The root contexts to search rights foruser
- The user to testprofileIds
- The ids of the profiles- Returns:
- true if any connected user has a permission on at least one object supported by this profile assignment storage, given some groups and profiles
-
hasGroupDeniedProfile
@Deprecated boolean hasGroupDeniedProfile(Set<? extends Object> rootContexts, GroupIdentity group, Set<String> profileIds)
Deprecated.This method used to be used byProfileAssignmentStorageExtensionPoint
but was proved to be useless and may be removed from the API in the future (see RUNTIME-2688).Returns true if group has the denied profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmitted- Parameters:
rootContexts
- The root contexts to search rights forgroup
- The group to testprofileIds
- The ids of the profiles- Returns:
- true if any connected user has a permission on at least one object supported by this profile assignment storage, given some groups and profiles
-
hasGroupAllowedProfile
boolean hasGroupAllowedProfile(Set<? extends Object> rootContexts, GroupIdentity group, Set<String> profileIds)
Returns true if group has the allowed profile for any given root context (or any sub context), given some profiles.
Only supported objects are transmitted- Parameters:
rootContexts
- The root contexts to search rights forgroup
- The group to testprofileIds
- The ids of the profiles- Returns:
- true if any connected user has a permission on at least one object supported by this profile assignment storage, given some groups and profiles
-
getAllowedProfilesForAnyConnectedUser
Set<String> getAllowedProfilesForAnyConnectedUser(Object object)
Gets the allowed profiles any connected user has on the given object- Parameters:
object
- The object- Returns:
- the allowed profiles any connected user has on the given object
-
isAnyConnectedUserAllowed
boolean isAnyConnectedUserAllowed(Object object, String profileId)
Returns true if any connected user is allowed with the given profile- Parameters:
object
- The objectprofileId
- The id of the profile- Returns:
- true if any connected user is allowed with the given profile
-
getDeniedProfilesForAnyConnectedUser
Set<String> getDeniedProfilesForAnyConnectedUser(Object object)
Gets the denied profiles any connected user has on the given object- Parameters:
object
- The object- Returns:
- the denied profiles any connected user has on the given object
-
isAnyConnectedUserDenied
boolean isAnyConnectedUserDenied(Object object, String profileId)
Returns true if any connected user is denied with the given profile- Parameters:
object
- The objectprofileId
- The id of the profile- Returns:
- true if any connected user is denied with the given profile
-
getAllowedProfilesForAnonymous
Set<String> getAllowedProfilesForAnonymous(Object object)
Gets the allowed profiles an anonymous user has on the given object- Parameters:
object
- The object- Returns:
- the allowed profiles an anonymous user has on the given object
-
isAnonymousAllowed
boolean isAnonymousAllowed(Object object, String profileId)
Returns true if anonymous is allowed with the given profile- Parameters:
object
- The objectprofileId
- The id of the profile- Returns:
- true if anonymous is allowed with the given profile
-
getDeniedProfilesForAnonymous
Set<String> getDeniedProfilesForAnonymous(Object object)
Gets the denied profiles an anonymous user has on the given object- Parameters:
object
- The object- Returns:
- the denied profiles an anonymous user has on the given object
-
isAnonymousDenied
boolean isAnonymousDenied(Object object, String profileId)
Returns true if anonymous is denied with the given profile- Parameters:
object
- The objectprofileId
- The id of the profile- Returns:
- true if anonymous is denied with the given profile
-
getAllowedProfilesForUser
Set<String> getAllowedProfilesForUser(UserIdentity user, Object object)
Get the allowed profiles assigned on the given object for the given user- Parameters:
user
- The userobject
- The object to test- Returns:
- The allowed profiles
-
getAllowedProfilesForUsers
Map<UserIdentity,Set<String>> getAllowedProfilesForUsers(Object object)
Gets the users that have allowed profiles assigned on the given object- Parameters:
object
- The object to test- Returns:
- The map of allowed users (keys) with their assigned profiles (values)
-
getAllowedUsers
Set<UserIdentity> getAllowedUsers(Object object, String profileId)
Gets the users that have the given allowed profile on the given object- Parameters:
object
- The object to testprofileId
- The id of the profile- Returns:
- The allowed users with that profile on that object
-
getAllowedProfilesForGroups
Map<GroupIdentity,Set<String>> getAllowedProfilesForGroups(Object object)
Gets the groups that have allowed profiles assigned on the given object- Parameters:
object
- The object to test- Returns:
- The map of allowed groups (keys) with their assigned profiles (values)
-
getAllowedGroups
Set<GroupIdentity> getAllowedGroups(Object object, String profileId)
Gets the groups that have the given allowed profile on the given object- Parameters:
object
- The object to testprofileId
- The id of the profile- Returns:
- The allowed groups with that profile on that object
-
getDeniedProfilesForUser
Set<String> getDeniedProfilesForUser(UserIdentity user, Object object)
Get the denied profiles assigned on the given object for the given user- Parameters:
user
- The userobject
- The object to test- Returns:
- The denied profiles
-
getDeniedProfilesForUsers
Map<UserIdentity,Set<String>> getDeniedProfilesForUsers(Object object)
Gets the users that have denied profiles assigned on the given object- Parameters:
object
- The object to test- Returns:
- The map of denied users (keys) with their assigned profiles (values)
-
getDeniedUsers
Set<UserIdentity> getDeniedUsers(Object object, String profileId)
Gets the users that have the given denied profile on the given object- Parameters:
object
- The object to testprofileId
- The id of the profile- Returns:
- The denied users with that profile on that object
-
getDeniedProfilesForGroups
Map<GroupIdentity,Set<String>> getDeniedProfilesForGroups(Object object)
Gets the groups that have denied profiles assigned on the given object- Parameters:
object
- The object to test- Returns:
- The map of denied groups (keys) with their assigned profiles (values)
-
getDeniedGroups
Set<GroupIdentity> getDeniedGroups(Object object, String profileId)
Gets the groups that have the given denied profile on the given object- Parameters:
object
- The object to testprofileId
- The id of the profile- Returns:
- The denied groups with that profile on that object
-
isSupported
boolean isSupported(Object object)
Returns true if this profile storage supports the given object, i.e. if it is able to retrieve the allowed users/groups on that object- Parameters:
object
- The object to test- Returns:
- true if this profile storage supports the given object
-
isRootContextSupported
boolean isRootContextSupported(Object rootContext)
Returns true if this profile storage supports the given object as a root context i.e. it can seek any permission under this object- Parameters:
rootContext
- The object to start searching- Returns:
- true if this profile storage support this a as root context to search in
-
getPriority
int getPriority()
Returns the priority of this profile storage TheProfileAssignmentStorageExtensionPoint
will take the profile storage which supports the object with the highest priority to return the allowed/denied users/groups- Returns:
- the priority of this profile storage
-
isInheritanceDisallowed
boolean isInheritanceDisallowed(Object object)
Returns true if the inheritance of permissions is disallowed on the given object- Parameters:
object
- The object to test- Returns:
- true if the inheritance of permissions is disallowed on the given object
-
-