Skip to content
Snippets Groups Projects
Commit e9faf706 authored by pabois's avatar pabois
Browse files

more readable

parent 95ecd8fd
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,15 @@ module User::WithRegistrationContext
end
def user_can_access_registration_context?
(registration_context.has_feature?(:alumni) && registration_context.alumni.where(email: email).any?) ||
(registration_context.has_feature?(:contacts) && registration_context.connected_persons.where(email: email).any?)
user_is_alumni? || user_is_contact?
end
def user_is_alumni?
registration_context.has_feature?(:alumni) && registration_context.alumni.where(email: email).any?
end
def user_is_contact?
registration_context.has_feature?(:contacts) && registration_context.connected_persons.where(email: email).any?
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment