public void init() {
logger.debug("Initializing groups...");
if (this.findGroup(1) == null) {
logger.debug("Adding group root.");
JbsUserGroup rootGroup = new JbsUserGroup();
rootGroup.setId(1);
rootGroup.setGroupName("root");
rootGroup.setGroupDescription("The group for the root-users.");
this.createGroup(rootGroup);
}
if (this.findGroup(10) == null) {
logger.debug("Adding group companyRoot");
JbsUserGroup companyRootGroup = new JbsUserGroup();
companyRootGroup.setId(10);
companyRootGroup.setGroupName("companyRoot");
companyRootGroup.setGroupDescription("The group for the company-root-users.");
this.createGroup(companyRootGroup);
}
if (this.findGroup(100) == null) {
logger.debug("Adding group users.");
JbsUserGroup usersGroup = new JbsUserGroup();
usersGroup.setId(100);
usersGroup.setGroupName("users");
usersGroup.setGroupDescription("The group for normal users.");
this.createGroup(usersGroup);
}
if (this.findGroup(1001) == null) {
logger.debug("Adding group webUsers.");
JbsUserGroup usersGroup = new JbsUserGroup();
usersGroup.setId(1001);
usersGroup.setGroupName("webUsers");
usersGroup.setGroupDescription("The group for users that were registeres via web and do not have any access to the software itself.");
this.createGroup(usersGroup);
}
}