mirror of
https://github.com/bugsink/bugsink.git
synced 2026-02-21 13:58:47 -06:00
Remove perm-based permission-checks
For now, sticking to "how it actually works" is more important than "what we might need in the future". We don't have an admin-group with actually handed out perms yet, and we do have the recommendation to create a superuser in the installation docs. So let's just explicity check for that. (I found these checks while working on actual breakage in the previous commit)
This commit is contained in:
@@ -213,7 +213,7 @@ def project_members_invite(request, project_pk):
|
||||
|
||||
if get_settings().USER_REGISTRATION in [CB_ANYBODY, CB_MEMBERS]:
|
||||
user_must_exist = False
|
||||
elif get_settings().USER_REGISTRATION == CB_ADMINS and request.user.has_perm("users.add_user"):
|
||||
elif get_settings().USER_REGISTRATION == CB_ADMINS and request.user.is_superuser:
|
||||
user_must_exist = False
|
||||
else:
|
||||
user_must_exist = True
|
||||
|
||||
@@ -180,7 +180,7 @@ def team_members_invite(request, team_pk):
|
||||
|
||||
if get_settings().USER_REGISTRATION in [CB_ANYBODY, CB_MEMBERS]:
|
||||
user_must_exist = False
|
||||
elif get_settings().USER_REGISTRATION == CB_ADMINS and request.user.has_perm("users.add_user"):
|
||||
elif get_settings().USER_REGISTRATION == CB_ADMINS and request.user.is_superuser:
|
||||
user_must_exist = False
|
||||
else:
|
||||
user_must_exist = True
|
||||
|
||||
Reference in New Issue
Block a user