Class: Maquina::UserPolicy

Inherits:
ApplicationPolicy show all
Defined in:
app/policies/maquina/user_policy.rb

Instance Method Summary collapse

Methods inherited from ApplicationPolicy

#destroy?, #edit?, #show?, #update?

Instance Method Details

#create?Boolean

Returns:

  • (Boolean)


13
14
15
# File 'app/policies/maquina/user_policy.rb', line 13

def create?
  new?
end

#index?Boolean

Returns:

  • (Boolean)


5
6
7
# File 'app/policies/maquina/user_policy.rb', line 5

def index?
  management? || admin?
end

#new?Boolean

Returns:

  • (Boolean)


9
10
11
# File 'app/policies/maquina/user_policy.rb', line 9

def new?
  management? || admin?
end

#new_modal?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'app/policies/maquina/user_policy.rb', line 17

def new_modal?
  new?
end