Allow add/remove user with only query-users role. (#4228)

This commit is contained in:
Stan Silvert 2023-01-19 14:58:51 -05:00 committed by GitHub
parent ae5b8ac525
commit bf5d37a03c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -74,7 +74,12 @@ export default function UsersSection() {
const refresh = () => setKey(key + 1);
const { hasAccess } = useAccess();
const isManager = hasAccess("manage-users");
// Only needs query-users access to attempt add/delete of users.
// This is because the user could have fine-grained access to users
// of a group. There is no way to know this without searching the
// permissions of every group.
const isManager = hasAccess("query-users");
useFetch(
async () => {