acciente / oacc-core

OACC (Object ACcess Control) is an advanced Java Application Security Framework
http://oaccframework.org/
Apache License 2.0
107 stars 23 forks source link

Get all permission by resourcesClaas #51

Open sixframa opened 1 year ago

sixframa commented 1 year ago

Hi: I am new using OACC. I look like that fit perfect in our use cases but I am not able to see how to get all permission that a resource has over other resource of a specific resource class(without doing it one by one). For instance, let's say we have users ans documents. We want to know all documents that a user has some permission and which permission are. I found the following methods: getEffectiveResourcePermissions and getResourcePermissions which query a single accessed resource I am looking for a method that given an accessor return all resources for a specific resourceClass with the permission of each one. I think is the same than "getGlobalResourcePermissionsMap" but not for global. Example: Given accessor "user1" get all accessed resources of type "document" and permission of each one. Result expected: Map<String, Set> <"document1.pdf",ResourcePermission[read,write]> <"document.pdf",ResourcePermission[read]> <"document3.pdf",ResourcePermission[read,write]>