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

Offline newbee2

  • Associate
  • **
  • Posts: 4
  • Forum Citizenship: +0/-0
Retrieve all the user's capabilities
« on: 12 Jan 2010 08:05:33 pm »
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
  • ***
  • Posts: 41
  • Forum Citizenship: +3/-0
Re: Retrieve all the user's capabilities
« Reply #1 on: 12 Jun 2010 02:58:25 pm »
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

  • Administrator
  • Full Member
  • ******
  • Posts: 45
  • Forum Citizenship: +3/-0
Re: Retrieve all the user's capabilities
« Reply #2 on: 05 Aug 2010 11: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.