Skip to content

Commit

Permalink
Backport fix #701
Browse files Browse the repository at this point in the history
  • Loading branch information
wlorenzetti committed Jan 3, 2024
1 parent a15303f commit eab02a2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions g3w-admin/usersmanage/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -500,6 +500,11 @@ def __authrole_fields(self):
return fields

def filterFieldsByRoles(self, **kwargs):

# When a module that provides a new user backend (i.e. authldap module) is added to G3W-SUITE
# is necessary declare again the choices of 'backend' field
self.fields['backend'].choices = USER_BACKEND_TYPES

if self.request.user.is_superuser:
if not self.request.user.is_staff:
self.fields.pop('is_staff')
Expand Down

0 comments on commit eab02a2

Please sign in to comment.