Interface GroupProvider
- All Known Implementing Classes:
WrappedGroupProvider
public interface GroupProvider
A provider for group membership information for users of the system.
-
Method Summary
Modifier and TypeMethodDescriptionString[]getGroupsForUser(@NotNull UserContext userContext) Get the groups to which the specified user belongs.booleanisAclEditor(@NotNull UserContext userContext) Check if the specified user is an ACL editor.booleanisMember(@NotNull UserContext userContext, @NotNull String owner, @NotNull String... groups) Check if the specified user is a member or supervisor of any of the specified groups.booleanisSuperUser(@NotNull UserContext userContext) Check if the specified user is a superuser.
-
Method Details
-
getGroupsForUser
Get the groups to which the specified user belongs.- Parameters:
userContext- the user- Returns:
- an array of groups the user belongs to.
-
isSuperUser
Check if the specified user is a superuser.- Parameters:
userContext- the user- Returns:
- true if the user was a superuser
-
isMember
boolean isMember(@NotNull @NotNull UserContext userContext, @NotNull @NotNull String owner, @NotNull @NotNull String... groups) Check if the specified user is a member or supervisor of any of the specified groups.- Parameters:
userContext- the userowner- the owner of the objectgroups- the groups to check membership of- Returns:
- true if the user is a member, or supervisor of the specified groups
-
isAclEditor
Check if the specified user is an ACL editor.- Parameters:
userContext- the user- Returns:
- true if the user is an ACL editor, and false otherwise
-