Skip to content

Commit

Permalink
feat(rbac switch): if env var is set, switch off extensive rbac testing
Browse files Browse the repository at this point in the history
  • Loading branch information
cong-or committed Jan 29, 2025
1 parent 9b9ed60 commit 76abb66
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions catalyst-gateway/bin/src/service/common/auth/rbac/scheme.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ impl ResponseError for AuthTokenError {

/// Convert this error to a HTTP response.
fn as_response(&self) -> poem::Response
where
Self: Error + Send + Sync + 'static,
{
where Self: Error + Send + Sync + 'static {
ErrorResponses::unauthorized().into_response()
}
}
Expand All @@ -86,9 +84,7 @@ impl ResponseError for AuthTokenAccessViolation {

/// Convert this error to a HTTP response.
fn as_response(&self) -> poem::Response
where
Self: Error + Send + Sync + 'static,
{
where Self: Error + Send + Sync + 'static {
// TODO: Actually check permissions needed for an endpoint.
ErrorResponses::forbidden(Some(self.0.clone())).into_response()
}
Expand Down

0 comments on commit 76abb66

Please sign in to comment.