[ http://jira.magnolia.info/browse/MAGNOLIA-834?page=comments#action_11846 
] 

Sameer Charles commented on MAGNOLIA-834:
-----------------------------------------

Even if MgnlContext is set, getUser will return null if you are not logged in.
At the moment if MgnlContext is null it falls back to SystemContext which also 
does not have any default user set.

I will introduce Anonymous user which will be present in users workspace so you 
could always adopt its permissions, 
- getUser(name) call on UserManager (all implementations including external 
user manager) will always return the specified user
- getUser() on MgnlContext will return either a logged-in user  or  "Anonymous" 
user.

> createVersion failed because MgnlContext.getUser() is null
> ----------------------------------------------------------
>
>          Key: MAGNOLIA-834
>          URL: http://jira.magnolia.info/browse/MAGNOLIA-834
>      Project: magnolia
>         Type: Bug

>   Components: core
>     Versions: 3.0 Beta 1
>  Environment: M3.0
>     Reporter: Ralf Hirning
>     Assignee: Sameer Charles
>     Priority: Blocker

>
>
> If I want to create a version using Content.addVersion I get an 
> java.lang.NullPointerException because in
> VersionManager.createVersion(Content node, Rule rule) line 173:
>             versionedNode.getMetaData().setProperty(MetaData.VERSION_USER, 
> MgnlContext.getUser().getName());
> MgnlContext.getUser() delivers null

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.magnolia.info/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


----------------------------------------------------------------
for list details see
http://www.magnolia.info/en/magnolia/developer.html
----------------------------------------------------------------

Reply via email to