Is it possible to access the current users groups from within a NXQL query?
Hello,
in our project we have a set of new document types with a property 'assignee'. The documents can be assigned to a user or a user group which means that the user/group will be responsible to work on the specified documents.
Now I am trying to create a Content View that shows all the documents that the current user has to work on. For the documents directly assigned to the user this is pretty easy:
ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState = 'Assigned' and rt:assignee = ?
where #{currentUser.name} is used as the parameter
But is it possible to access the groups that the user is member of inside the NXQL query?
Thanks, Dirk
Not sure if i understand the question, but current user groups should be available by:
#{currentUser.groups}
or
#{currentUser.allGroups}
if you'd like to get all groups user is a member of (resolving groups hierarchy)
for example: My content view
ecm:mixinType != 'HiddenInNavigation' AND ecm:isCheckedInVersion = 0 AND ecm:currentLifeCycleState != 'deleted' AND (group the user) ?