use of org.jbei.ice.lib.entry.EntryPermissions in project ice by JBEI.
the class FolderPermissions method disablePublicReadAccess.
public boolean disablePublicReadAccess() {
authorization.expectWrite(userId, folder);
GroupController groupController = new GroupController();
Group publicGroup = groupController.createOrRetrievePublicGroup();
permissionDAO.removePermission(null, folder, null, null, publicGroup, true, false);
if (folder.isPropagatePermissions()) {
for (Entry folderContent : folder.getContents()) {
EntryPermissions entryPermissions = new EntryPermissions(Long.toString(folderContent.getId()), userId);
entryPermissions.disablePublicReadAccess();
}
}
return true;
}
Aggregations