How to get the current user
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 06:22 AM
Hi.Can anyone tell me how to get the current user logged in Nuxeo..I am using NuxeoPrincipal but it comes null.I take it this way: @Context NuxeoPrincipal principal
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 08:02 AM
In what context do you need the principal? Low-level Java code? Java Operation code? Automation scripting? EL?
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 08:42 AM
In java Operation code
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2017 11:56 AM
May be this way:
@Context
protected OperationContext ctx;
@OperationMethod
public DocumentModel run(DocumentModel doc) throws Exception {
Principal principal = ctx.getPrincipal();
}
