Hi Markus,

Check out:

MgnlContext.doInSystemContext(new MgnlContext.VoidOp() {
                        @Override
                        public void doExec() {
                                // do something with system privileges...
                        }
                });

Regards from Vienna,

Richard

-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]] 
Im Auftrag von Markus Malkusch
Gesendet: Mittwoch, 18. April 2012 13:42
An: [email protected]
Betreff: [magnolia-user] How to I temporarily grant more access?

Hi 

I'm doing some nasty things. I have an unauthorized public controller. This 
controller must do something with more access rights in the JCR. At the moment 
I get for a HierarchyManager.getContent("/myRepo"):

i.m.c.security.AccessDeniedException: User not allowed to Read path [/myRepo]

How can I temporarily grant more rights or disable this security constraints on 
this request's thread?

Markus Malkusch



----------------------------------------------------------------
For list details, see http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to