This commit is contained in:
parent
b9e97f6fbd
commit
5306a1e682
@ -27,7 +27,11 @@ public class Token implements Authentication {
|
||||
public boolean isAdmin() { return (sudoRealUser != null) || user.admin; }
|
||||
public User getRealUser() { return sudoRealUser != null ? sudoRealUser : user; }
|
||||
|
||||
public void unSudo() { if (sudoRealUser != null) user = sudoRealUser; }
|
||||
public void unSudo() {
|
||||
if (sudoRealUser != null)
|
||||
user = sudoRealUser;
|
||||
sudoRealUser = null;
|
||||
}
|
||||
|
||||
public void sudo(@NonNull User newUser) {
|
||||
if (this.sudoRealUser == null) sudoRealUser = user;
|
||||
|
Loading…
Reference in New Issue
Block a user