Skip to content
Snippets Groups Projects
Commit aa001dce authored by Yauheni Lesnikau's avatar Yauheni Lesnikau
Browse files

add owner permission checking to hasViewerAccessToRecord in CloudStorageImpl of Azure CSP

parent d6d39c93
No related branches found
No related tags found
2 merge requests!744Upgraded packages to mitigated vulns in netty, guava, snakeyaml,!606add owner permission checking to hasViewerAccessToRecord in CloudStorageImpl of Azure CSP
......@@ -240,8 +240,11 @@ public class CloudStorageImpl implements ICloudStorage {
});
boolean isEntitledForViewing = dataEntitlementsService.hasAccessToData(headers,
new HashSet<>(Arrays.asList(acls)));
boolean isRecordOwner = record.getUser().equalsIgnoreCase(headers.getUserEmail());
return isEntitledForViewing || isRecordOwner;
boolean isRecordCreator = record.getUser().equalsIgnoreCase(headers.getUserEmail());
if (!isEntitledForViewing && !isRecordCreator) {
return hasOwnerAccessToRecord(record);
}
return true;
}
private boolean hasOwnerAccessToRecord(RecordMetadata record)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment