mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-06 03:06:04 +00:00
fix: prevent timing out members which have TimeoutMembers permission
This commit is contained in:
@@ -62,6 +62,7 @@ impl IntoResponse for Error {
|
||||
ErrorType::NotPrivileged => StatusCode::FORBIDDEN,
|
||||
ErrorType::CannotGiveMissingPermissions => StatusCode::FORBIDDEN,
|
||||
ErrorType::NotOwner => StatusCode::FORBIDDEN,
|
||||
ErrorType::IsElevated => StatusCode::FORBIDDEN,
|
||||
|
||||
ErrorType::DatabaseError { .. } => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
ErrorType::InternalError => StatusCode::INTERNAL_SERVER_ERROR,
|
||||
|
||||
@@ -138,6 +138,7 @@ pub enum ErrorType {
|
||||
NotPrivileged,
|
||||
CannotGiveMissingPermissions,
|
||||
NotOwner,
|
||||
IsElevated,
|
||||
|
||||
// ? General errors
|
||||
DatabaseError {
|
||||
|
||||
@@ -69,6 +69,7 @@ impl<'r> Responder<'r, 'static> for Error {
|
||||
ErrorType::NotPrivileged => Status::Forbidden,
|
||||
ErrorType::CannotGiveMissingPermissions => Status::Forbidden,
|
||||
ErrorType::NotOwner => Status::Forbidden,
|
||||
ErrorType::IsElevated => Status::Forbidden,
|
||||
|
||||
ErrorType::DatabaseError { .. } => Status::InternalServerError,
|
||||
ErrorType::InternalError => Status::InternalServerError,
|
||||
|
||||
Reference in New Issue
Block a user