Module: CamaleonCms::UserRolesHelper

Included in:
CamaleonController
Defined in:
app/helpers/camaleon_cms/user_roles_helper.rb

Overview

encoding: utf-8

Instance Method Summary collapse

Instance Method Details

#cama_get_roles_valuesObject



11
12
13
14
15
16
17
18
# File 'app/helpers/camaleon_cms/user_roles_helper.rb', line 11

def cama_get_roles_values
  roles_list = CamaleonCms::UserRole::ROLES
  # permit to add custom roles to be listed in editing roles form
  # sample: args[:roles_list][:manager] << { key: 'my_role_key', label: "my_custom_permission", description: "lorem ipsum"}
  # authorize! :manage, :my_role_key
  args = {roles_list: roles_list}; hooks_run("available_user_roles_list", args)
  args[:roles_list]
end