mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-21 11:56:38 +00:00
refactor(admin): extract user policy binding route registration (#1796)
This commit is contained in:
@@ -38,6 +38,7 @@ pub mod trace;
|
|||||||
pub mod user;
|
pub mod user;
|
||||||
pub mod user_iam;
|
pub mod user_iam;
|
||||||
pub mod user_lifecycle;
|
pub mod user_lifecycle;
|
||||||
|
pub mod user_policy_binding;
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use super::{account_info, event, group, policies, service_account, user_iam, user_lifecycle};
|
use super::{account_info, group, service_account, user_iam, user_lifecycle, user_policy_binding};
|
||||||
use crate::{
|
use crate::{
|
||||||
admin::{
|
admin::{
|
||||||
auth::validate_admin_request,
|
auth::validate_admin_request,
|
||||||
@@ -61,8 +61,7 @@ pub fn register_user_route(r: &mut S3Router<AdminOperation>) -> std::io::Result<
|
|||||||
group::register_group_management_route(r)?;
|
group::register_group_management_route(r)?;
|
||||||
service_account::register_service_account_route(r)?;
|
service_account::register_service_account_route(r)?;
|
||||||
user_iam::register_user_iam_route(r)?;
|
user_iam::register_user_iam_route(r)?;
|
||||||
policies::register_iam_policy_route(r)?;
|
user_policy_binding::register_user_policy_binding_route(r)?;
|
||||||
event::register_notification_target_route(r)?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
// Copyright 2024 RustFS Team
|
||||||
|
//
|
||||||
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
// you may not use this file except in compliance with the License.
|
||||||
|
// You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing, software
|
||||||
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
// See the License for the specific language governing permissions and
|
||||||
|
// limitations under the License.
|
||||||
|
|
||||||
|
use super::{event, policies};
|
||||||
|
use crate::admin::router::{AdminOperation, S3Router};
|
||||||
|
|
||||||
|
pub fn register_user_policy_binding_route(r: &mut S3Router<AdminOperation>) -> std::io::Result<()> {
|
||||||
|
policies::register_iam_policy_route(r)?;
|
||||||
|
event::register_notification_target_route(r)?;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user