peterlu
11 years agoChampion
permission api
what is the api to query if a user has a certain permission, eg, "switch user"? I know that we can use role to check. But it is not the best way.
- 11 years ago
Hi peterlu,
The coreNode custom context object has a permissions.hasPermission(...) method that allows you to check the permission of the current user in the node. See here for more details:
http://lithosphere.lithium.com/t5/developers-knowledge-base/coreNode-Context-object/ta-p/9319
I hope this helps!