git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/branches/data-access/storagehub-webapp/1.0@169631 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
d5983bca18
commit
c9c396368e
|
@ -45,7 +45,7 @@ public class AuthorizationChecker {
|
|||
//in case of newItem the id is the parent otherwise the old node to replace
|
||||
Node node = session.getNodeByIdentifier(id);
|
||||
|
||||
Item item = ItemHandler.getItem(node, Arrays.asList(ACCOUNTING_NAME,CONTENT_NAME));
|
||||
Item item = ItemHandler.getItem(node, Arrays.asList(ACCOUNTING_NAME,CONTENT_NAME, METADATA_NAME));
|
||||
|
||||
if (item.isShared()) {
|
||||
SharedFolder parentShared = retrieveSharedFolderParent(item, session);
|
||||
|
@ -56,7 +56,7 @@ public class AuthorizationChecker {
|
|||
for (AccessControlEntry entry: entries) {
|
||||
if (entry.getPrincipal().getName().equals(AuthorizationProvider.instance.get().getClient().getId()) || (parentShared.isVreFolder() && entry.getPrincipal().getName().equals(parentShared.getTitle()))) {
|
||||
for (Privilege privilege : entry.getPrivileges()){
|
||||
AccessType access = AccessType.valueOf(privilege.getName());
|
||||
AccessType access = AccessType.fromValue(privilege.getName());
|
||||
if (isNewItem && access!=AccessType.READ_ONLY)
|
||||
return;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue