[
http://jira.nuxeo.org/browse/NXP-3273?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=50457#action_50457
]
Nel Taurisson commented on NXP-3273:
------------------------------------
I may be wrong, but, using the same logic that for the group, it is possible to
build a list of permission, something like that :
Set<String> permissions = new HashSet<String>() ;
List<String> groups = user.getAllGroups() ;
ACL merged = doc.getACP().getMergedACLs( "merged" ) ;
for( ACE ace : merged.getACEs() ) {
if( user.getName().equals( ace.getUsername() ) ||
groups.contains(ace.getUsername()) ) {
if( ace.isGranted() ) {
permissions.add( ace.getPermission() ) ;
} else {
permissions.remove( ace.getPermission() ) ;
}
}
}
And then just lookup the tasks assigned to these permissions :
for(String permission : permissions) {
prefixedActorsId.add(PERMISSION_PREFIX + permission) ;
}
> add the possibility to attribute task on permission (or other properties)
> -------------------------------------------------------------------------
>
> Key: NXP-3273
> URL: http://jira.nuxeo.org/browse/NXP-3273
> Project: Nuxeo Enterprise Platform
> Issue Type: Bug
> Reporter: Alexandre Russel
> Assignee: Alexandre Russel
>
> In the JbpmService, when getting a user's tasks, the considered tasks
> are those with actor id or pooled actor id like "user:theUser" or
> "group:oneOfTheUserGroup".
> Would it make sense to have a mechanism enabling permission assignation
> for tasks ? Actor id / pooled actor id could be something like
> "permission:aSpecificPermissionRequiredOnDoc".
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.nuxeo.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
_______________________________________________
ECM-tickets mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm-tickets