Sha256: bc3cc8d10be8d77ea9367fd3cb863cf035bd9f73e44c01490ff7c587c71666f9
Contents?: true
Size: 278 Bytes
Versions: 3
Compression:
Stored size: 278 Bytes
Contents
# Policy for user model class UserPolicy < ControllerPolicy attr_reader :user, :objects def initialize(user, objects) @user = user @objects = objects end def clone? false end def destroy? (keppler_admin? || admin?) && !same_user?(@user) end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
keppler-2.0.2 | installer/core/app/policies/user_policy.rb |
keppler-2.0.1 | installer/core/app/policies/user_policy.rb |
keppler-2.0.0 | installer/core/app/policies/user_policy.rb |