Skip to content

Commit 6232891

Browse files
authored
Fix role issues on Selections (#62)
1 parent a783fec commit 6232891

3 files changed

Lines changed: 12 additions & 12 deletions

File tree

selections/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@
4646
@auth.oidc_auth
4747
@before_request
4848
def main(info=None):
49-
is_evals = 'eboard-evaluations' in info['group_list']
50-
is_rtp = 'rtp' in info['group_list']
49+
is_evals = '/eboard-evaluations' in info['group_list']
50+
is_rtp = '/active_rtp' in info['group_list']
5151
member = Members.query.filter_by(username=info['uid']).first()
5252

5353
all_applications = Applicant.query.all()

selections/blueprints/application.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
def get_application(app_id, info=None):
1616
applicant_info = Applicant.query.filter_by(id=app_id).first()
1717
member = Members.query.filter_by(username=info['uid']).first()
18-
is_evals = 'eboard-evaluations' in info['group_list']
19-
is_rtp = 'rtp' in info['group_list']
18+
is_evals = '/eboard-evaluations' in info['group_list']
19+
is_rtp = '/active_rtp' in info['group_list']
2020
if not member and not (is_rtp or is_evals):
2121
return redirect(url_for('main'))
2222

selections/blueprints/teams.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
@auth.oidc_auth
1010
@before_request
1111
def get_teams(info=None):
12-
is_evals = 'eboard-evaluations' in info['group_list']
13-
is_rtp = 'rtp' in info['group_list']
12+
is_evals = '/eboard-evaluations' in info['group_list']
13+
is_rtp = '/active_rtp' in info['group_list']
1414

1515
if not is_evals and not is_rtp:
1616
flash('Not Evals or an RTP')
@@ -37,8 +37,8 @@ def get_teams(info=None):
3737
@auth.oidc_auth
3838
@before_request
3939
def create_team(info=None):
40-
is_evals = 'eboard-evaluations' in info['group_list']
41-
is_rtp = 'rtp' in info['group_list']
40+
is_evals = '/eboard-evaluations' in info['group_list']
41+
is_rtp = '/active_rtp' in info['group_list']
4242

4343
if not is_evals and not is_rtp:
4444
flash('Not Evals or an RTP')
@@ -72,8 +72,8 @@ def create_team(info=None):
7272
@auth.oidc_auth
7373
@before_request
7474
def add_to_team(team_id, info=None):
75-
is_evals = 'eboard-evaluations' in info['group_list']
76-
is_rtp = 'rtp' in info['group_list']
75+
is_evals = '/eboard-evaluations' in info['group_list']
76+
is_rtp = '/active_rtp' in info['group_list']
7777

7878
if not is_evals and not is_rtp:
7979
flash('Not Evals or an RTP')
@@ -105,8 +105,8 @@ def add_to_team(team_id, info=None):
105105
@auth.oidc_auth
106106
@before_request
107107
def remove_from_team(username, info=None):
108-
is_evals = 'eboard-evaluations' in info['group_list']
109-
is_rtp = 'rtp' in info['group_list']
108+
is_evals = '/eboard-evaluations' in info['group_list']
109+
is_rtp = '/active_rtp' in info['group_list']
110110

111111
if not is_evals and not is_rtp:
112112
return 'Not Evals or an RTP'

0 commit comments

Comments
 (0)