IUserHasAdminRightToEdit Method (IUser) |
Namespace: AskiaPortalCmn
Rule | userA | userB | userA.HasAdminRightToEdit(userB); |
---|---|---|---|
A user cannot edit himself. (even if it's a super-admin) | Id = 5 IsSuperAdmin = true | Id = 5 IsSuperAdmin = true | False |
A super-admin is allowed to edit everybody. (even another super-admin, except the root user) | Id = 5 IsSuperAdmin = true | Id = 6 IsSuperAdmin = true | True |
A super-admin is not allowed to edit the root user. | Id = 5 IsSuperAdmin = true | Id = 1 (root user) IsSuperAdmin = true | False |
A super-admin cannot be edited by a non super-admin. | Id = 5 IsSuperAdmin = false Permissions { "users" : "FullControl"} ManagedGroups {1, 2, 3} | Id = 6 IsSuperAdmin = true GroupId = 3 | False |
A user that doesn't have permission to edit user. | Id = 5 IsSuperAdmin = false Permissions { "users" : "ReadOnly"} ManagedGroups {1, 2, 3} | Id = 6 IsSuperAdmin = false GroupId = 3 | False |
A user that have permission to edit user, but not to manage the group of the tested user | Id = 5 IsSuperAdmin = false Permissions { "users" : "FullControl"} ManagedGroups {1, 2} | Id = 6 IsSuperAdmin = false GroupId = 3 | False |
A user that have permission to edit user, and to manage the group of the tested user | Id = 5 IsSuperAdmin = false Permissions { "users" : "FullControl"} ManagedGroups {1, 2, 3} | Id = 6 IsSuperAdmin = false GroupId = 3 | True |
A user is never allowed to modify his own administrative privilege.
A super-admin can only be edited by another super-admin.