This commit is contained in:
Lucio Lelii 2018-11-20 13:08:45 +00:00
parent f6f90ff0d4
commit 12ff4fcbeb
1 changed files with 2 additions and 2 deletions

View File

@ -35,12 +35,12 @@ public class AuthorizationChecker {
if (item==null) throw new UserNotAuthorizedException("Insufficent Provileges for user "+login+" to read node with id "+id+": it's not a valid StorageHub node");
if (item.isPublicItem()) return;
if (item.isShared()) {
SharedFolder parentShared = node2Item.getItem(retrieveSharedFolderParent(node, session), Excludes.EXCLUDE_ACCOUNTING);
if (!parentShared.getUsers().getValues().containsKey(login))
throw new UserNotAuthorizedException("Insufficent Provileges for user "+login+" to read node with id "+id);
} else if (!item.getOwner().equals(login))
} else if (item.getOwner()==null || !item.getOwner().equals(login))
throw new UserNotAuthorizedException("Insufficent Provileges for user "+login+" to read node with id "+id);
}