Class: TentD::API::Authorization
- Inherits:
-
Middleware
- Object
- Middleware
- TentD::API::Authorization
- Defined in:
- lib/tentd/api/authorization.rb
Instance Method Summary collapse
Methods inherited from Middleware
Methods included from Authorizable
#authorize_env!, #authorize_env?
Constructor Details
This class inherits a constructor from TentD::API::Middleware
Instance Method Details
#action(env) ⇒ Object
4 5 6 7 8 9 10 11 |
# File 'lib/tentd/api/authorization.rb', line 4 def action(env) env. = [] if env.current_auth.kind_of?(Model::AppAuthorization) env. = env.current_auth.scopes.map(&:to_sym) env..delete(:read_secrets) unless env.params && env.params.secrets.to_s == 'true' end env end |