Author Topic: Retrieve all the user's capabilities  (Read 4476 times)

Offline newbee2

  • Associate
  • **
  • Join Date: Nov 2009
  • Posts: 4
  • Forum Citizenship: +0/-0
Retrieve all the user's capabilities
« on: 12 Jan 2010 08:05:33 am »
Hi all,

this is possible to retrieve all the Capabilities of one particular user?
I found an example but its just for the currently logged user.

Best Regards

Offline xiska

  • Full Member
  • ***
  • Join Date: Mar 2009
  • Posts: 41
  • Forum Citizenship: +3/-0
Re: Retrieve all the user's capabilities
« Reply #1 on: 12 Jun 2010 03:58:25 am »
Hi

Not so easy.
The sample you might have seen is using the session object.

In your case you need to get all memberships, as well as the memberships of the memberships, of the user and test them against the existence of the membershiplist and the user itselft of the capability. There is a function to get all role and group memberships of a user but it does not recognise :: - roles like camid(::System Administrator). So your result may become inaccurate.

Have fun.

Offline rocket

  • Senior Member
  • ****
  • Join Date: Aug 2005
  • Posts: 57
  • Forum Citizenship: +3/-0
Re: Retrieve all the user's capabilities
« Reply #2 on: 05 Aug 2010 12:57:37 pm »
BSP Software's MetaManager (www.bspsoftware.com) has a Content Store Documenter module that documents membership and capability information just as you've described.

Offline jackmaster

  • Full Member
  • ***
  • Join Date: Apr 2012
  • Posts: 7
  • Forum Citizenship: +0/-0
Re: Retrieve all the user's capabilities
« Reply #3 on: 24 Apr 2012 10:01:24 am »
Hi,
   
 I'm facing the same problem. I can retrieve all groups and roles and theirs members using expandMembers() function but i don't know how to extract capabilities of these users. Does anyone find the solution for it?

Thanks in advance!   

   

Offline murali999

  • Full Member
  • ***
  • Join Date: Dec 2011
  • Posts: 21
  • Forum Citizenship: +0/-0
Re: Retrieve all the user's capabilities
« Reply #4 on: 20 Jun 2012 06:33:20 am »
Hi,

PFA Java Program that will list all the Capabilities with their access permissions and creates the CSV file
open the output CSV file in Excel ..


by doing small modification to this code you can get the user specific capabilities

Regards,
Murali.

 


       
Twittear