Class: CamaleonCms::UserRole
- Inherits:
-
TermTaxonomy
- Object
- ActiveRecord::Base
- CamaleonRecord
- TermTaxonomy
- CamaleonCms::UserRole
- Defined in:
- app/models/camaleon_cms/user_role.rb
Constant Summary collapse
- ROLES =
{ post_type: [ { key: 'edit', label: I18n.t('camaleon_cms.admin.users.roles_values.html_create_or_edit').to_s, color: 'success', description: I18n.t('camaleon_cms.admin.users.tool_tip.create_or_edit').to_s }, { key: 'edit_other', label: I18n.t('camaleon_cms.admin.users.roles_values.html_edit_other').to_s, color: 'success', description: I18n.t('camaleon_cms.admin.users.tool_tip.edit_other').to_s }, { key: 'edit_publish', label: I18n.t('camaleon_cms.admin.users.roles_values.html_edit_publish').to_s, color: 'success', description: I18n.t('camaleon_cms.admin.users.tool_tip.edit_publish').to_s }, { key: 'publish', label: I18n.t('camaleon_cms.admin.users.roles_values.publish').to_s, color: 'success', description: I18n.t('camaleon_cms.admin.users.tool_tip.publish').to_s }, { key: 'delete', label: I18n.t('camaleon_cms.admin.button.delete').to_s, color: 'danger', description: I18n.t('camaleon_cms.admin.users.tool_tip.delete').to_s }, { key: 'delete_other', label: I18n.t('camaleon_cms.admin.users.roles_values.html_delete_other').to_s, color: 'danger', description: I18n.t('camaleon_cms.admin.users.tool_tip.delete_other').to_s }, { key: 'delete_publish', label: I18n.t('camaleon_cms.admin.users.roles_values.html_delete_publish').to_s, color: 'danger', description: I18n.t('camaleon_cms.admin.users.tool_tip.delete_publish').to_s }, # { # key: 'read_private', # label: "#{I18n.t('camaleon_cms.admin.users.roles_values.html_read_private')}", # color: 'info', # description: "#{I18n.t('camaleon_cms.admin.users.tool_tip.read_private')}" # }, { key: 'manage_categories', label: I18n.t('camaleon_cms.admin.users.roles_values.html_manage_categories').to_s, color: 'warning', description: I18n.t('camaleon_cms.admin.users.tool_tip.manage_categories').to_s }, { key: 'manage_tags', label: I18n.t('camaleon_cms.admin.users.roles_values.html_manage_tags').to_s, color: 'warning', description: I18n.t('camaleon_cms.admin.users.tool_tip.manage_tags').to_s } ], manager: [ { key: 'media', label: I18n.t('camaleon_cms.admin.users.roles_values.media').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.media').to_s }, { key: 'comments', label: I18n.t('camaleon_cms.admin.users.roles_values.comments').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.comments').to_s }, { key: 'themes', label: I18n.t('camaleon_cms.admin.users.roles_values.themes').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.themes').to_s }, { key: 'widgets', label: I18n.t('camaleon_cms.admin.sidebar.widgets').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.widgets').to_s }, { key: 'nav_menu', label: I18n.t('camaleon_cms.admin.sidebar.menus').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.menus').to_s }, { key: 'plugins', label: I18n.t('camaleon_cms.admin.sidebar.plugins').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.plugins').to_s }, { key: 'users', label: I18n.t('camaleon_cms.admin.sidebar.users').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.users').to_s }, { key: 'settings', label: I18n.t('camaleon_cms.admin.sidebar.settings').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.settings').to_s }, { key: 'theme_settings', label: I18n.t('camaleon_cms.admin.settings.theme_setting', default: 'Theme Settings').to_s, description: I18n.t('camaleon_cms.admin.users.tool_tip.themes').to_s } ] }.freeze
Constants inherited from TermTaxonomy
TermTaxonomy::TRANSLATION_TAG_HIDE_MAP, TermTaxonomy::TRANSLATION_TAG_HIDE_REGEX, TermTaxonomy::TRANSLATION_TAG_RESTORE_MAP, TermTaxonomy::TRANSLATION_TAG_RESTORE_REGEX
Instance Method Summary collapse
Methods inherited from TermTaxonomy
#children, #in_nav_menu_items, inherited, #skip_slug_validation?
Methods included from CustomFieldsRead
#add_custom_field_group, #add_custom_field_to_default_group, #get_field_groups, #get_field_object, #get_field_value, #get_field_values, #get_field_values_hash, #get_fields_grouped, #get_fields_object, #get_user_field_groups, #save_field_value, #set_field_value, #set_field_values, #update_field_value
Methods included from Metas
#delete_meta, #delete_option, #fix_save_metas_options_no_changed, #get_meta, #get_option, #options, #save_metas_options, #save_metas_options_skip, #set_meta, #set_metas, #set_option, #set_options
Methods inherited from CamaleonRecord
#cama_build_cache_key, #cama_fetch_cache, #cama_get_cache, #cama_remove_cache, #cama_set_cache
Instance Method Details
#editable? ⇒ Boolean
17 18 19 |
# File 'app/models/camaleon_cms/user_role.rb', line 17 def editable? term_group.nil? end |
#roles_manager ⇒ Object
13 14 15 |
# File 'app/models/camaleon_cms/user_role.rb', line 13 def roles_manager ('_manager') end |
#roles_post_type ⇒ Object
9 10 11 |
# File 'app/models/camaleon_cms/user_role.rb', line 9 def roles_post_type ('_post_type') end |