Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible for a non-Super to remove Super from a Super #8

Open
jeremy-farrance opened this issue Oct 26, 2023 · 1 comment
Open

Possible for a non-Super to remove Super from a Super #8

jeremy-farrance opened this issue Oct 26, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@jeremy-farrance
Copy link
Owner

jeremy-farrance commented Oct 26, 2023

Seen it happen, but need to prove it. If bad, the problem is prolly line 268 in Controllers/UserManageController.cs. Weird thing is a non-Super shouldn't be able to edit a Super, right? Or?

This
userInfo.IsSuperUser = currentUser.IsSuperUser ? user.IsSuperUser : false;

Should prolly be this, but tersed

            if (currentUser.IsSuperUser)
            {
                userInfo.IsSuperUser = user.IsSuperUser;
            }
            else
            {
                // nop
            }
@jeremy-farrance jeremy-farrance self-assigned this Oct 26, 2023
@jeremy-farrance jeremy-farrance added the bug Something isn't working label Oct 26, 2023
@jeremy-farrance
Copy link
Owner Author

Similar issue on .IsDeleted? It looks like an alread IsDeleted user, when edited by a non-Super will un-delete the user on save.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant