Allow assignment of study groups for internal users

This commit is contained in:
Sebastian Serth
2022-09-20 15:52:55 +02:00
committed by Sebastian Serth
parent 998a12e6bc
commit 4d2fe22daf
6 changed files with 79 additions and 2 deletions

View File

@ -11,6 +11,8 @@ class InternalUser < User
validates :password, confirmation: true, if: -> { password_void? && validate_password? }, on: :update, presence: true
validate :password_strength, if: -> { password_void? && validate_password? }, on: :update
accepts_nested_attributes_for :study_group_memberships
def activated?
activation_state == 'active'
end