Browse Source
Merge pull request #2933 from stefan0xC/fix-manager-issue
allow managers to set groups of a collection
pull/2868/head
Daniel García
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/api/core/organizations.rs
|
@ -1748,7 +1748,7 @@ async fn _restore_organization_user( |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#[get("/organizations/<org_id>/groups")] |
|
|
#[get("/organizations/<org_id>/groups")] |
|
|
async fn get_groups(org_id: String, _headers: AdminHeaders, mut conn: DbConn) -> JsonResult { |
|
|
async fn get_groups(org_id: String, _headers: ManagerHeadersLoose, mut conn: DbConn) -> JsonResult { |
|
|
let groups = Group::find_by_organization(&org_id, &mut conn).await.iter().map(Group::to_json).collect::<Value>(); |
|
|
let groups = Group::find_by_organization(&org_id, &mut conn).await.iter().map(Group::to_json).collect::<Value>(); |
|
|
|
|
|
|
|
|
Ok(Json(json!({ |
|
|
Ok(Json(json!({ |
|
|