Module: Admin::UserActionsHelper

Included in:
UserEntity
Defined in:
app/helpers/admin/user_actions_helper.rb

Instance Method Summary collapse

Instance Method Details

#admin_actions(user) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'app/helpers/admin/user_actions_helper.rb', line 5

def admin_actions(user)
  return [] if user.internal?

  @actions ||= ['edit']

  return @actions if user == current_user

  @user ||= user

  blocked_actions
  deactivate_actions
  unlock_actions
  delete_actions
  ban_actions

  @actions
end