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

Merge branch 'main' of github.com:noesya/osuny

parents 67fcf708 0a014495
No related branches found
No related tags found
No related merge requests found
......@@ -31,11 +31,11 @@ class Extranet::ApplicationController < ApplicationController
end
def user_is_alumnus
about.alumni.find_by(id: current_user.person&.id).present?
current_extranet.feature_alumni? && about.alumni.find_by(id: current_user.person&.id).present?
end
def user_is_contact
current_extranet.connected_people.find_by(id: current_user.person&.id).present?
current_extranet.feature_contacts? && current_extranet.connected_people.find_by(id: current_user.person&.id).present?
end
end
......@@ -95,7 +95,13 @@ class Communication::Extranet < ApplicationRecord
end
def users
university.users.where(person: alumni)
if feature_alumni?
university.users.where(person: alumni)
elsif feature_contacts?
university.users.where(person: connected_people)
else
university.users.none
end
end
def cohorts
......
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