asciinema.org/app/policies/user_policy.rb

18 lines
277 B
Ruby
Raw Normal View History

2014-07-05 12:59:42 +00:00
class UserPolicy < ApplicationPolicy
class Scope < Struct.new(:user, :scope)
def resolve
scope
end
end
def permitted_attributes
[:username, :name, :email, :theme_name, :asciicasts_private_by_default]
end
2014-07-05 12:59:42 +00:00
def update?
record == user
end
end