Class: Biovision::Components::ContentComponent

Inherits:
BaseComponent show all
Defined in:
app/services/biovision/components/content_component.rb

Overview

Component for content

Instance Attribute Summary

Attributes inherited from BaseComponent

#component, #name, #slug, #user

Instance Method Summary collapse

Methods inherited from BaseComponent

#[], #[]=, allow?, default_privilege_name, handler, handler_class, #initialize, #receive, #register_metric, #settings, #settings=, #use_parameters?

Constructor Details

This class inherits a constructor from Biovision::Components::BaseComponent

Instance Method Details

#allow?(options = {}) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
# File 'app/services/biovision/components/content_component.rb', line 7

def allow?(options = {})
  UserPrivilege.user_has_privilege?(user, :content_manager)
end