Module: Karafka::Web::Pro::Ui::Lib::Features

Defined in:
lib/karafka/web/pro/ui/lib/features.rb

Overview

Module that aliases our features in the UI for controllers and views to simplify features checks

Class Method Summary collapse

Class Method Details

.commanding!Object

Ensures that commanding is on.

Raises:



47
48
49
50
51
# File 'lib/karafka/web/pro/ui/lib/features.rb', line 47

def commanding!
  return if commanding?

  forbidden!
end

.commanding?Boolean

Returns is commanding turned on.

Returns:

  • (Boolean)

    is commanding turned on



41
42
43
# File 'lib/karafka/web/pro/ui/lib/features.rb', line 41

def commanding?
  ::Karafka::Web.config.commanding.active
end

.topics_management!Object

Raises:



60
61
62
63
64
# File 'lib/karafka/web/pro/ui/lib/features.rb', line 60

def topics_management!
  return if topics_management?

  forbidden!
end

.topics_management?Boolean

Returns is topics managements turned on.

Returns:

  • (Boolean)

    is topics managements turned on



54
55
56
# File 'lib/karafka/web/pro/ui/lib/features.rb', line 54

def topics_management?
  Karafka::Web.config.ui.topics.management.active
end