mirror of
https://github.com/Blah-IM/blahrs.git
synced 2025-05-01 00:31:09 +00:00
Report 403 Forbidden for insufficient permission
This commit is contained in:
parent
4456513139
commit
74bd0d42e2
1 changed files with 2 additions and 2 deletions
|
@ -147,7 +147,7 @@ async fn room_create(
|
|||
.map_err(from_db_error)?
|
||||
.filter(|(_, perm)| perm.contains(ServerPermission::CREATE_ROOM))
|
||||
else {
|
||||
return Err(StatusCode::UNAUTHORIZED);
|
||||
return Err(StatusCode::FORBIDDEN);
|
||||
};
|
||||
|
||||
let ruuid = Uuid::new_v4();
|
||||
|
@ -466,7 +466,7 @@ async fn room_post_item(
|
|||
.map_err(from_db_error)?
|
||||
else {
|
||||
tracing::debug!("rejected post: unpermitted user {}", chat.signee.user);
|
||||
return Err(StatusCode::UNAUTHORIZED);
|
||||
return Err(StatusCode::FORBIDDEN);
|
||||
};
|
||||
|
||||
let cid = conn
|
||||
|
|
Loading…
Add table
Reference in a new issue