directory-fortress mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Pike <clp...@psu.edu>
Subject Re: Load Admin Permissions
Date Mon, 15 May 2017 20:23:25 GMT
It looks like the addPermissionAttributeSet is missing from that. I think DelegatedAdminManagerLoad.xml
has everything, but not sure if there is an easy way to read that file. 

I think ideally I would create an annotation that could be put on API methods that indicated
if they had a corresponding admin permission, then I could just inspect the APIs for those
annotations.



----- Original Message -----
From: "Shawn McKinney" <smckinney@apache.org>
To: fortress@directory.apache.org
Sent: Monday, May 15, 2017 4:09:19 PM
Subject: Re: Load Admin Permissions

there is one possibility for current.  You can interrogate these objects.  They are used for
testing, but are kept up to date.

starting around line 1086:
https://github.com/apache/directory-fortress-core/blob/master/src/test/java/org/apache/directory/fortress/core/impl/PermTestData.java

Shawn

> On May 15, 2017, at 2:52 PM, Chris Pike <clp207@psu.edu> wrote:
> 
> Won't reviewMgr.findPermissions only find permissions that are already loaded into ldap?
> 
> 
> 
> ----- Original Message -----
> From: "Shawn McKinney" <smckinney@apache.org>
> To: fortress@directory.apache.org
> Sent: Monday, May 15, 2017 3:42:31 PM
> Subject: Re: Load Admin Permissions
> 
>> On May 15, 2017, at 2:31 PM, Shawn McKinney <smckinney@apache.org> wrote:
>> 
>> Chris, the list of all admin permissions is returned by calling this api:
>> http://directory.apache.org/fortress/gen-docs/latest/apidocs/org/apache/directory/fortress/core/DelReviewMgr.html#findRoles-java.lang.String-
> 
> er, let’s try again.  This is the API you would call:
> 
> perm.setAdmin( isAdmin );
> permsList = reviewMgr.findPermissions( perm );
> 
> which is to say use the reviewmgr.findpermissions but set the admin flag on the perm
entity.
> 
> Thinking about this a bit, it should be implemented in the delreviewmgr, even if it just
wraps the reveiwmgr call as this is confusing to the user.
> 
> Hope this helps.
> 
> Shawn

Mime
View raw message