Class: TentD::API::Followers::AuthorizeWriteOne
- Inherits:
-
Middleware
- Object
- Middleware
- TentD::API::Followers::AuthorizeWriteOne
- 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
38 39 40 41 42 43 44 45 |
# File 'lib/tentd/api/followers.rb', line 38 def action(env) unless env.params.follower_id && env.current_auth && env.current_auth.kind_of?(Model::Follower) && env.current_auth.id == env.params.follower_id (env, :write_followers) end env. << :self env end |