use of net.jforum.security.RoleValue in project jforum2 by rafaelsteil.
the class ForumAction method addRole.
private void addRole(PermissionControl pc, String roleName, int forumId, String[] groups) {
Role role = new Role();
role.setName(roleName);
for (int i = 0; i < groups.length; i++) {
int groupId = Integer.parseInt(groups[i]);
RoleValueCollection roleValues = new RoleValueCollection();
RoleValue rv = new RoleValue();
rv.setValue(Integer.toString(forumId));
roleValues.add(rv);
pc.addRoleValue(groupId, role, roleValues);
}
}
Aggregations