Skip to content

Commit

Permalink
Merge pull request #991 from ScilifelabDataCentre/no-projs-in-delete-…
Browse files Browse the repository at this point in the history
…superadmin

Add check for if superadmin for delete email
  • Loading branch information
i-oden authored Mar 3, 2022
2 parents fedfe9c + 7ea5200 commit 5282046
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dds_web/api/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,9 @@ def delete(self):

username = current_user.username

proj_ids = [proj.public_id for proj in current_user.projects]
proj_ids = None
if current_user.role != "Super Admin":
proj_ids = [proj.public_id for proj in current_user.projects]

# Create URL safe token for invitation link
s = itsdangerous.URLSafeTimedSerializer(flask.current_app.config["SECRET_KEY"])
Expand Down

0 comments on commit 5282046

Please sign in to comment.