mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-10-27 14:16:18 +00:00
chore: minor auth crate change (#2176)
* chore: pub auth_mysql * chore: pub all error * chore: remove back to error * chore: wrap failed permission check result to err * chore: minor change
This commit is contained in:
@@ -84,6 +84,8 @@ pub enum StatusCode {
|
||||
InvalidAuthHeader = 7004,
|
||||
/// Illegal request to connect catalog-schema
|
||||
AccessDenied = 7005,
|
||||
/// User is not authorized to perform the operation
|
||||
PermissionDenied = 7006,
|
||||
// ====== End of auth related status code =====
|
||||
}
|
||||
|
||||
@@ -120,7 +122,8 @@ impl StatusCode {
|
||||
| StatusCode::UserPasswordMismatch
|
||||
| StatusCode::AuthHeaderNotFound
|
||||
| StatusCode::InvalidAuthHeader
|
||||
| StatusCode::AccessDenied => false,
|
||||
| StatusCode::AccessDenied
|
||||
| StatusCode::PermissionDenied => false,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -151,7 +154,8 @@ impl StatusCode {
|
||||
| StatusCode::UserPasswordMismatch
|
||||
| StatusCode::AuthHeaderNotFound
|
||||
| StatusCode::InvalidAuthHeader
|
||||
| StatusCode::AccessDenied => false,
|
||||
| StatusCode::AccessDenied
|
||||
| StatusCode::PermissionDenied => false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user