Hi Bence,
Something like the following class should work.
Configure which security manager is used under:
config->server->security->groupManager->@class
Should work from an install-task as well, I think, although you might need to
change the user-manager before the install happens. Not sure on this.
Regards,
Richie
import info.magnolia.cms.security.AccessDeniedException;
import info.magnolia.cms.security.Group;
import info.magnolia.cms.security.MgnlGroupManager;
import info.magnolia.cms.security.PrincipalNotFoundException;
import static info.magnolia.cms.security.SecurityConstants.NODE_ROLES;
/**
* @author Richard Unger
*/
public class BetterGroupManager extends MgnlGroupManager {
// TODO @Override
public void removeRole(Group group, String roleName) throws
AccessDeniedException, PrincipalNotFoundException {
remove(group.getName(), roleName, NODE_ROLES);
return;
}
}
-----Ursprüngliche Nachricht-----
Von: [email protected] [mailto:[email protected]]
Im Auftrag von Bence Vass (via Magnolia Forums)
Gesendet: Dienstag, 29. Jänner 2013 12:34
An: Magnolia User List
Betreff: [magnolia-user] Re: MgnlGroupManager cannot remove roles
The reason I am asking is because I would like to remove roles from groups in
an update task, but it doesn't seem possible at the moment.
I am using Magnolia 4.5.7, am I missing something?
--
Context is everything:
http://forum.magnolia-cms.com/forum/thread.html?threadId=a772b8a5-eb79-4c12-a2f2-42bdc1cc573f
----------------------------------------------------------------
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]>
----------------------------------------------------------------
----------------------------------------------------------------
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]>
----------------------------------------------------------------