git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/branches/data-access/storagehub-webapp/1.0@174238 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
f6f90ff0d4
commit
12ff4fcbeb
|
@ -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);
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue