diff --git a/engine/src/api/routes.rs b/engine/src/api/routes.rs index 6dc31898..0f70b115 100644 --- a/engine/src/api/routes.rs +++ b/engine/src/api/routes.rs @@ -467,8 +467,7 @@ async fn get_all_channels( /// ``` #[patch("/channel/{id}")] #[protect( - "Role::GlobalAdmin", - "Role::ChannelAdmin", + any("Role::GlobalAdmin", "Role::ChannelAdmin"), ty = "Role", expr = "user.channels.contains(&*id) || role.has_authority(&Role::GlobalAdmin)" )] diff --git a/frontend/components/ConfigChannel.vue b/frontend/components/ConfigChannel.vue index ef806ae1..c8f9a93f 100644 --- a/frontend/components/ConfigChannel.vue +++ b/frontend/components/ConfigChannel.vue @@ -15,8 +15,9 @@ v-model="channel.name" type="text" placeholder="Type here" - class="input input-bordered w-full" + class="input input-bordered w-full !bg-base-100" @keyup="isChanged" + :disabled="authStore.role === 'User'" /> @@ -27,8 +28,9 @@ @@ -39,8 +41,10 @@ @@ -88,7 +92,7 @@ -