Skip to content

Commit

Permalink
Do not allow admin to remove himself/herself from system.
Browse files Browse the repository at this point in the history
  • Loading branch information
jburel committed Dec 16, 2013
1 parent d7f98ab commit 89d4fea
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2007,10 +2007,13 @@ public void setExistingObjects(List objects)
selected.add(experimenter);
//Cannot move guest or root
if ((model.isSystemUser(id, GroupData.GUEST) &&
model.isSystemGroup(groupId, GroupData.GUEST)) ||
(model.isSystemUser(id, GroupData.SYSTEM) &&
model.isSystemGroup(groupId, GroupData.SYSTEM))) {
model.isSystemGroup(groupId, GroupData.GUEST))) {
immutable.add(experimenter);
} else if (model.isSystemGroup(groupId, GroupData.SYSTEM)) {
if (model.isSystemUser(id, GroupData.SYSTEM) ||
id == userID) {
immutable.add(experimenter);
}
}
}
if (!ids.contains(experimenter.getId())) {
Expand Down

0 comments on commit 89d4fea

Please sign in to comment.