Class: Mumuki::Domain::Organization::Settings
- Inherits:
-
Mumukit::Platform::Model
- Object
- Mumukit::Platform::Model
- Mumuki::Domain::Organization::Settings
- Includes:
- Mumukit::Login::LoginSettingsHelpers
- Defined in:
- lib/mumuki/domain/organization/settings.rb
Instance Method Summary collapse
- #disabled? ⇒ Boolean
- #disabled_from=(disabled_from) ⇒ Object
- #forum_discussions_minimal_role ⇒ Object
- #in_preparation? ⇒ Boolean
- #in_preparation_until=(in_preparation_until) ⇒ Object
- #login_methods ⇒ Object
- #private? ⇒ Boolean
Instance Method Details
#disabled? ⇒ 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_role ⇒ Object
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
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_methods ⇒ Object
26 27 28 |
# File 'lib/mumuki/domain/organization/settings.rb', line 26 def login_methods @login_methods ||= ['user_pass'] end |
#private? ⇒ Boolean
22 23 24 |
# File 'lib/mumuki/domain/organization/settings.rb', line 22 def private? !public? end |