You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fortress@directory.apache.org by Chris Pike <cl...@psu.edu> on 2015/12/14 17:00:26 UTC
Retrieving Role Permissions
Is there an API call get all permissions assigned to a role that doesn't look at the role hierarchy?
The ReviewManager "rolePermissions" method returns all permissions granted or inherited, but I need a method that only returns permissions directly assigned to the role.
Re: Retrieving Role Permissions
Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 15, 2015, at 1:04 PM, Chris Pike <cl...@psu.edu> wrote:
>
> I dug into the method and determined the problem. It was not searching how I envisioned. I went ahead and added a new method "findAnyPermissions" to the review manager that searches any part of the string and does an OR between obj and op. I created a pull request in github
>
> https://github.com/apache/directory-fortress-core/pull/2
>
> Let me know what you think
Chris the code looks good so I accepted the pull request and added the corresponding enmasse service. Here’s the ticket:
https://issues.apache.org/jira/browse/FC-130
Nice job btw. :-)
We do need to add junit test cases to verify...
Thanks
Shawn
Re: Retrieving Role Permissions
Posted by Chris Pike <cl...@psu.edu>.
I dug into the method and determined the problem. It was not searching how I envisioned. I went ahead and added a new method "findAnyPermissions" to the review manager that searches any part of the string and does an OR between obj and op. I created a pull request in github
https://github.com/apache/directory-fortress-core/pull/2
Let me know what you think
----- Original Message -----
From: "Chris Pike" <cl...@psu.edu>
To: fortress@directory.apache.org
Sent: Tuesday, December 15, 2015 11:39:55 AM
Subject: Re: Retrieving Role Permissions
Ok, another API question, I'm trying to search for permissions using the reviewManager "findPermissions" method, but am never getting any results returned. Any ideas?
----- Original Message -----
From: "Shawn McKinney" <sm...@apache.org>
To: fortress@directory.apache.org
Sent: Monday, December 14, 2015 3:01:10 PM
Subject: Re: Retrieving Role Permissions
> On Dec 14, 2015, at 12:44 PM, Chris Pike <cl...@psu.edu> wrote:
>
>
> On the review manager, there is a method permissionUsers that says it returns all users who have been directly granted a permission. How can a user be directly granted a permission? I thought permissions were only granted through roles?
Yes, RBAC prescribes user-roles-permissions. The user-permission mapping is not part of the rbac standard but is nonetheless simple, useful, and has been there since the beginning.
Shawn
Re: Retrieving Role Permissions
Posted by Chris Pike <cl...@psu.edu>.
Ok, another API question, I'm trying to search for permissions using the reviewManager "findPermissions" method, but am never getting any results returned. Any ideas?
----- Original Message -----
From: "Shawn McKinney" <sm...@apache.org>
To: fortress@directory.apache.org
Sent: Monday, December 14, 2015 3:01:10 PM
Subject: Re: Retrieving Role Permissions
> On Dec 14, 2015, at 12:44 PM, Chris Pike <cl...@psu.edu> wrote:
>
>
> On the review manager, there is a method permissionUsers that says it returns all users who have been directly granted a permission. How can a user be directly granted a permission? I thought permissions were only granted through roles?
Yes, RBAC prescribes user-roles-permissions. The user-permission mapping is not part of the rbac standard but is nonetheless simple, useful, and has been there since the beginning.
Shawn
Re: Retrieving Role Permissions
Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 14, 2015, at 12:44 PM, Chris Pike <cl...@psu.edu> wrote:
>
>
> On the review manager, there is a method permissionUsers that says it returns all users who have been directly granted a permission. How can a user be directly granted a permission? I thought permissions were only granted through roles?
Yes, RBAC prescribes user-roles-permissions. The user-permission mapping is not part of the rbac standard but is nonetheless simple, useful, and has been there since the beginning.
Shawn
Re: Retrieving Role Permissions
Posted by Chris Pike <cl...@psu.edu>.
Thanks! It worked in my simple test scenario.
On the review manager, there is a method permissionUsers that says it returns all users who have been directly granted a permission. How can a user be directly granted a permission? I thought permissions were only granted through roles?
----- Original Message -----
From: "Shawn McKinney" <sm...@apache.org>
To: fortress@directory.apache.org
Sent: Monday, December 14, 2015 12:19:36 PM
Subject: Re: Retrieving Role Permissions
> On Dec 14, 2015, at 10:00 AM, Chris Pike <cl...@psu.edu> wrote:
>
> Is there an API call get all permissions assigned to a role that doesn't look at the role hierarchy?
>
> The ReviewManager "rolePermissions" method returns all permissions granted or inherited, but I need a method that only returns permissions directly assigned to the role.
No, but there is now:
https://issues.apache.org/jira/browse/FC-128
Very easy change, but have not added test cases to verify - yet.
Shawn
Re: Retrieving Role Permissions
Posted by Shawn McKinney <sm...@apache.org>.
> On Dec 14, 2015, at 10:00 AM, Chris Pike <cl...@psu.edu> wrote:
>
> Is there an API call get all permissions assigned to a role that doesn't look at the role hierarchy?
>
> The ReviewManager "rolePermissions" method returns all permissions granted or inherited, but I need a method that only returns permissions directly assigned to the role.
No, but there is now:
https://issues.apache.org/jira/browse/FC-128
Very easy change, but have not added test cases to verify - yet.
Shawn