public class PermissionsController extends Object
Constructor and Description |
---|
PermissionsController() |
Modifier and Type | Method and Description |
---|---|
boolean |
accountHasReadPermission(Account account,
Set<Folder> folders) |
boolean |
accountHasWritePermission(Account account,
Set<Folder> folders) |
protected Permission |
addPermission(AccessPermission access,
Entry entry,
Folder folder,
BulkUpload upload) |
Permission |
addPermission(String userId,
AccessPermission access) |
boolean |
groupHasReadPermission(List<Group> groups,
Set<Folder> folders) |
boolean |
groupHasWritePermission(List<Group> groups,
Set<Folder> folders) |
boolean |
hasWritePermission(String userId,
Folder folder) |
boolean |
isPubliclyVisible(Entry entry)
Determines whether an entry has assigned public privileges either directly or by virtue of being in a folder
that has public privileges assigned
|
boolean |
isPublicVisible(Folder folder) |
boolean |
propagateFolderPermissions(String userId,
Folder folder,
boolean add)
Propagates the permissions for the folder to the contained entries
|
void |
removePermission(String userId,
AccessPermission access) |
List<AccessPermission> |
retrieveSetFolderPermission(Folder folder,
boolean includePublic)
Retrieves permissions that have been explicitly set for the folders with the exception
of the public read permission if specified in the parameter.
|
FolderDetails |
setFolderPermissions(String userId,
long folderId,
List<AccessPermission> permissions) |
public Permission addPermission(String userId, AccessPermission access)
protected Permission addPermission(AccessPermission access, Entry entry, Folder folder, BulkUpload upload)
public void removePermission(String userId, AccessPermission access)
public boolean accountHasReadPermission(Account account, Set<Folder> folders)
public boolean accountHasWritePermission(Account account, Set<Folder> folders)
public boolean groupHasWritePermission(List<Group> groups, Set<Folder> folders)
public boolean isPubliclyVisible(Entry entry)
entry
- entry being checked for public read privilegespublic boolean isPublicVisible(Folder folder)
public boolean groupHasReadPermission(List<Group> groups, Set<Folder> folders)
public List<AccessPermission> retrieveSetFolderPermission(Folder folder, boolean includePublic)
folder
- folder whose permissions are being retrievedincludePublic
- whether to include public access if setpublic boolean propagateFolderPermissions(String userId, Folder folder, boolean add)
userId
- unique identifier for account of user requesting action that led to this callfolder
- folder user permissions are being propagatedadd
- true if folder is to be added, false otherwisepublic FolderDetails setFolderPermissions(String userId, long folderId, List<AccessPermission> permissions)
Copyright © 2017. All rights reserved.