Module: CamaleonCms::UserRolesHelper
- Included in:
- CamaleonController
- Defined in:
- app/helpers/camaleon_cms/user_roles_helper.rb
Instance Method Summary collapse
Instance Method Details
#cama_get_roles_values ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'app/helpers/camaleon_cms/user_roles_helper.rb', line 3 def cama_get_roles_values @_cache_cama_get_roles_values ||= lambda { 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] }.call end |