Skip to content

Commit

Permalink
Merge pull request #345 from cisagov/320-error-message-when-attemptin…
Browse files Browse the repository at this point in the history
…g-to-deny

Allows regional admin to delete user via User Registration UI.
  • Loading branch information
schmelz21 authored Jun 26, 2024
2 parents 19775a8 + a59d25c commit 14b9561
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion backend/src/api/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,9 @@ class UpdateUser {
* - Users
*/
export const del = wrapHandler(async (event) => {
if (!isGlobalWriteAdmin(event)) return Unauthorized;
if (!isGlobalWriteAdmin(event) && !isRegionalAdmin(event))
return Unauthorized;

await connectToDatabase();
const id = event.pathParameters?.userId;
if (!id || !isUUID(id)) {
Expand Down

0 comments on commit 14b9561

Please sign in to comment.