Class: Legion::Extensions::Identity::Ldap::Actor::GroupRefresh

Inherits:
Actors::Every
  • Object
show all
Includes:
Helpers::Lex
Defined in:
lib/legion/extensions/identity/ldap/actors/group_refresh.rb

Overview

rubocop:disable Legion/Extension/SelfContainedActorRunnerClass, Legion/Extension/EveryActorRequiresTime

Constant Summary collapse

STALE_THRESHOLD =
86_400
ACTIVE_STATUS =
:active
STALE_STATUS =
:stale
EXPIRED_STATUS =
:expired

Instance Method Summary collapse

Constructor Details

#initialize(**opts) ⇒ GroupRefresh

Returns a new instance of GroupRefresh.



16
17
18
19
20
# File 'lib/legion/extensions/identity/ldap/actors/group_refresh.rb', line 16

def initialize(**opts)
  return unless enabled?

  super
end

Instance Method Details

#check_subtask?Boolean

Returns:

  • (Boolean)


25
# File 'lib/legion/extensions/identity/ldap/actors/group_refresh.rb', line 25

def check_subtask? = false

#enabled?Boolean

rubocop:disable Legion/Extension/ActorEnabledSideEffects

Returns:

  • (Boolean)


28
29
30
31
32
# File 'lib/legion/extensions/identity/ldap/actors/group_refresh.rb', line 28

def enabled? # rubocop:disable Legion/Extension/ActorEnabledSideEffects
  defined?(Legion::Extensions::Identity::Ldap::Helpers::GroupSync)
rescue StandardError => _e
  false
end

#generate_task?Boolean

Returns:

  • (Boolean)


26
# File 'lib/legion/extensions/identity/ldap/actors/group_refresh.rb', line 26

def generate_task? = false

#manualObject



34
35
36
37
38
# File 'lib/legion/extensions/identity/ldap/actors/group_refresh.rb', line 34

def manual
  sync_known_principals
rescue StandardError => e
  log.error("GroupRefresh: #{e.message}")
end

#run_now?Boolean

Returns:

  • (Boolean)


23
# File 'lib/legion/extensions/identity/ldap/actors/group_refresh.rb', line 23

def run_now?  = false

#timeObject



22
# File 'lib/legion/extensions/identity/ldap/actors/group_refresh.rb', line 22

def time      = 21_600

#use_runner?Boolean

Returns:

  • (Boolean)


24
# File 'lib/legion/extensions/identity/ldap/actors/group_refresh.rb', line 24

def use_runner?    = false