Class: TentD::API::Followers::AuthorizeReadOne
- Inherits:
-
Middleware
- Object
- Middleware
- TentD::API::Followers::AuthorizeReadOne
- Defined in:
- lib/tentd/api/followers.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
20 21 22 23 24 25 26 27 |
# File 'lib/tentd/api/followers.rb', line 20 def action(env) if env.params.follower_id && env.current_auth && env.current_auth.kind_of?(Model::Follower) && env.current_auth.id == env.params.follower_id env. << :self end env. = (env, :read_followers) env end |