Search in sources :

Example 1 with XMLPermissionControl

use of net.jforum.security.XMLPermissionControl in project jforum2 by rafaelsteil.

the class GroupAction method permissions.

// Permissions
public void permissions() {
    int id = this.request.getIntParameter("group_id");
    PermissionControl pc = new PermissionControl();
    pc.setRoles(DataAccessDriver.getInstance().newGroupSecurityDAO().loadRoles(id));
    String xmlconfig = SystemGlobals.getValue(ConfigKeys.CONFIG_DIR) + "/permissions.xml";
    List sections = new XMLPermissionControl(pc).loadConfigurations(xmlconfig);
    GroupDAO gm = DataAccessDriver.getInstance().newGroupDAO();
    this.context.put("sections", sections);
    this.context.put("group", gm.selectById(id));
    this.setTemplateName(TemplateKeys.GROUP_PERMISSIONS);
}
Also used : XMLPermissionControl(net.jforum.security.XMLPermissionControl) PermissionControl(net.jforum.security.PermissionControl) ArrayList(java.util.ArrayList) List(java.util.List) GroupDAO(net.jforum.dao.GroupDAO) XMLPermissionControl(net.jforum.security.XMLPermissionControl)

Aggregations

ArrayList (java.util.ArrayList)1 List (java.util.List)1 GroupDAO (net.jforum.dao.GroupDAO)1 PermissionControl (net.jforum.security.PermissionControl)1 XMLPermissionControl (net.jforum.security.XMLPermissionControl)1