Skip to content

Commit 7ee8e0e

Browse files
committed
add website admins for bootstrapping & update phone number default handling
1 parent 2ba2e46 commit 7ee8e0e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/permission/types.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@ async def has_permission(db_session: database.DBSession, computing_id: str) -> b
4343
"""
4444
A website admin has to be an active officer who has one of the above positions
4545
"""
46+
if computing_id in ["gsa92", "mdb15"]:
47+
return True
48+
4649
for position in await officers.crud.current_officer_positions(db_session, computing_id):
4750
if position in WebsiteAdmin.WEBSITE_ADMIN_POSITIONS:
4851
return True

src/scripts/migrate_from_about_officers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def get_key(officer):
155155
new_officer_info = OfficerInfo(
156156
computing_id = officer["sfu_computing_id"],
157157
legal_name = officer["full_name"],
158-
phone_number = str(officer["phone_number"]),
158+
phone_number = None if str(officer["phone_number"]) == 0 else str(officer["phone_number"]),
159159

160160
discord_id = officer["discord_id"],
161161
discord_name = officer["discord_username"],

0 commit comments

Comments
 (0)