Skip to content

Commit 0837819

Browse files
rename to userid, update comment
1 parent 9ce5124 commit 0837819

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

src/handlers/http/cluster/mod.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ pub async fn get_demo_data_from_ingestor(action: &str) -> Result<(), PostError>
222222

223223
// forward the role update request to all ingestors to keep them in sync
224224
pub async fn sync_users_with_roles_with_ingestors(
225-
username: &str,
225+
userid: &str,
226226
role: &HashSet<String>,
227227
operation: &str,
228228
) -> Result<(), RBACError> {
@@ -236,7 +236,7 @@ pub async fn sync_users_with_roles_with_ingestors(
236236
RBACError::SerdeError(err)
237237
})?;
238238

239-
let username = username.to_owned();
239+
let userid = userid.to_owned();
240240

241241
let op = operation.to_string();
242242

@@ -245,7 +245,7 @@ pub async fn sync_users_with_roles_with_ingestors(
245245
"{}{}/user/{}/role/sync/{}",
246246
ingestor.domain_name,
247247
base_path_without_preceding_slash(),
248-
username,
248+
userid,
249249
op
250250
);
251251

@@ -282,15 +282,15 @@ pub async fn sync_users_with_roles_with_ingestors(
282282
}
283283

284284
// forward the delete user request to all ingestors to keep them in sync
285-
pub async fn sync_user_deletion_with_ingestors(username: &str) -> Result<(), RBACError> {
286-
let username = username.to_owned();
285+
pub async fn sync_user_deletion_with_ingestors(userid: &str) -> Result<(), RBACError> {
286+
let userid = userid.to_owned();
287287

288288
for_each_live_ingestor(move |ingestor| {
289289
let url = format!(
290290
"{}{}/user/{}/sync",
291291
ingestor.domain_name,
292292
base_path_without_preceding_slash(),
293-
username
293+
userid
294294
);
295295

296296
async move {

src/handlers/http/modal/ingest/ingestor_rbac.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ pub async fn add_roles_to_user(
117117
Ok(HttpResponse::Ok().status(StatusCode::OK).finish())
118118
}
119119

120-
// Handler PATCH /user/{userid}/role/sync/add => Add roles to a user
120+
// Handler PATCH /user/{userid}/role/sync/remove => Remove roles to a user
121121
pub async fn remove_roles_from_user(
122122
userid: web::Path<String>,
123123
roles_to_remove: web::Json<HashSet<String>>,

0 commit comments

Comments
 (0)