use of gemma.gsec.model.UserGroup in project Gemma by PavlidisLab.
the class UserManagerImpl method deleteGroup.
@Override
public void deleteGroup(String groupName) {
UserGroup group = this.loadGroup(groupName);
userService.delete(group);
}
use of gemma.gsec.model.UserGroup in project Gemma by PavlidisLab.
the class UserManagerImpl method createGroup.
@Override
public void createGroup(String groupName, List<GrantedAuthority> authorities) {
UserGroup g = ubic.gemma.model.common.auditAndSecurity.UserGroup.Factory.newInstance();
g.setName(groupName);
for (GrantedAuthority ga : authorities) {
g.getAuthorities().add(ubic.gemma.model.common.auditAndSecurity.GroupAuthority.Factory.newInstance(ga.getAuthority()));
}
userService.create(g);
}
use of gemma.gsec.model.UserGroup in project Gemma by PavlidisLab.
the class UserManagerImpl method renameGroup.
@Override
public void renameGroup(String oldName, String newName) {
UserGroup group = userService.findGroupByName(oldName);
group.setName(newName);
userService.update(group);
}
use of gemma.gsec.model.UserGroup in project Gemma by PavlidisLab.
the class UserManagerImpl method addUserToGroup.
@Override
public void addUserToGroup(String username, String groupName) {
User u = this.loadUser(username);
UserGroup g = this.loadGroup(groupName);
userService.addUserToGroup(g, u);
}
use of gemma.gsec.model.UserGroup in project Gemma by PavlidisLab.
the class UserManagerImpl method removeGroupAuthority.
@Override
public void removeGroupAuthority(String groupName, GrantedAuthority authority) {
UserGroup group = this.loadGroup(groupName);
userService.removeGroupAuthority(group, authority.getAuthority());
}
Aggregations