Skip to content

Commit c9028ef

Browse files
remove lock as lock held in caller
1 parent 978a85e commit c9028ef

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/handlers/http/modal/query/querier_rbac.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,6 @@ pub async fn add_roles_to_user(
168168
let userid = userid.into_inner();
169169
let roles_to_add = roles_to_add.into_inner();
170170

171-
let _guard = UPDATE_LOCK.lock().await;
172-
173171
if !Users.contains(&userid) {
174172
return Err(RBACError::UserDoesNotExist);
175173
};
@@ -225,7 +223,7 @@ pub async fn remove_roles_from_user(
225223
let roles_to_remove = roles_to_remove.into_inner();
226224

227225
let _guard = UPDATE_LOCK.lock().await;
228-
226+
229227
if !Users.contains(&userid) {
230228
return Err(RBACError::UserDoesNotExist);
231229
};

0 commit comments

Comments
 (0)