2015-03-18 22:02:38 +00:00
|
|
|
class TokenPolicy < ApplicationPolicy
|
|
|
|
|
|
|
|
def show?
|
2015-04-03 22:37:37 +01:00
|
|
|
# local_admin?(record.subject)
|
|
|
|
is_admin? || owner?(record.subject) || local_admin?(record.subject)
|
2015-03-18 22:02:38 +00:00
|
|
|
end
|
|
|
|
alias_method :create?, :show?
|
|
|
|
alias_method :read?, :show?
|
|
|
|
alias_method :withdraw?, :show?
|
|
|
|
|
|
|
|
end
|