Class: Mumuki::Domain::Organization::Settings

Inherits:
Mumukit::Platform::Model
  • Object
show all
Includes:
Mumukit::Login::LoginSettingsHelpers
Defined in:
lib/mumuki/domain/organization/settings.rb

Instance Method Summary collapse

Instance Method Details

#disabled?Boolean

Returns:

  • (Boolean)


42
43
44
# File 'lib/mumuki/domain/organization/settings.rb', line 42

def disabled?
  disabled_from.present? && disabled_from.past?
end

#disabled_from=(disabled_from) ⇒ Object



34
35
36
# File 'lib/mumuki/domain/organization/settings.rb', line 34

def disabled_from=(disabled_from)
  @disabled_from = disabled_from&.in_time_zone
end

#forum_discussions_minimal_roleObject



30
31
32
# File 'lib/mumuki/domain/organization/settings.rb', line 30

def forum_discussions_minimal_role
  (@forum_discussions_minimal_role || 'ex_student').to_sym
end

#in_preparation?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'lib/mumuki/domain/organization/settings.rb', line 46

def in_preparation?
  in_preparation_until.present? && in_preparation_until.future?
end

#in_preparation_until=(in_preparation_until) ⇒ Object



38
39
40
# File 'lib/mumuki/domain/organization/settings.rb', line 38

def in_preparation_until=(in_preparation_until)
  @in_preparation_until = in_preparation_until&.in_time_zone
end

#login_methodsObject



26
27
28
# File 'lib/mumuki/domain/organization/settings.rb', line 26

def 
  @login_methods ||= ['user_pass']
end

#private?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'lib/mumuki/domain/organization/settings.rb', line 22

def private?
  !public?
end