Class SpaceAccessClassifier
java.lang.Object
org.exoplatform.documents.util.SpaceAccessClassifier
Decides whether an entry of a space document's stored access list reaches
outside the space. An entry is inside when it is a membership of the space's
own group (*, manager, member, redactor, publisher), the document's owner, a
member of the space, or an identity present on the access list of the
space's drive root; every other entry, everyone (
any) included, is
outside. The caller decides where membership is read from: the cached
space for a listing, the committed rows for a refusal or a removal.-
Field Summary
FieldsModifier and TypeFieldDescriptionThe membership types of the space's own group an entry may hold inside -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasOutsideEntry(Collection<String> identities, String owner) boolean
-
Field Details
-
SPACE_MEMBERSHIP_TYPES
-
-
Constructor Details
-
SpaceAccessClassifier
public SpaceAccessClassifier(String spaceGroupId, Predicate<String> isMember, Set<String> driveRootIdentities) - Parameters:
spaceGroupId- the space's group, such as/spaces/teamisMember- tells whether a user is a member of the spacedriveRootIdentities- the identities of the access list of the space's drive root
-
-
Method Details
-
hasOutsideEntry
- Parameters:
identities- the identities of a document's access list, one per entry, repeated when an identity holds several permissionsowner- the document's owner, null when it has none- Returns:
- true when at least one entry reaches outside the space
-
isOutside
-