[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Regarding searching admin permission objects



Hi,

I got it the search is working fine, But here is a issue when the admin objects are returned they have the flag isAdmin=false, as i was filtering the results on isAdmin=true so i was not seeing them. But shouldn't the results have isAdmin=true ?

Regards,
Ramandeep


On Sat, Dec 28, 2013 at 10:40 AM, Shawn McKinney <shawn.mckinney@jts.us> wrote:
On 12/27/2013 10:30 PM, Shawn McKinney wrote:
Searching admin permissions is same as searching for regular (rbac) permissions except you must first set the admin boolean flag to true on the Permission entity before invocation.  For example:

***
Permission perm = new Permission();
// This tells fortress to search admin permission tree:
perm.setAdmin( isAdmin );
// optionally set other search criteria needed to narrow result set i.e. object and/or operation names onto the permission input:
perm.setObjectName("foo-obj");
perm.setOpName("foo-op");
...
ReviewMgr reviewMgr = ReviewMgrFactory.createInstance(GlobalIds.HOME);
List<Permission> permsList = reviewMgr.findPermissions(perm);
***

Searching administrative permission objects is performed in similar manner:

if(isAdmin)
      permObj.setAdmin( true );
List<PermObj> permObjList = reviewMgr.findPermObjs( permObj );

--
Shawn McKinney
shawn.mckinney@jts.us




--
Ramandeep Singh
http://ramannanda.blogspot.com
ramannanda9@gmail.com