Skip to content

Commit

Permalink
Backport fix #701 (#705)
Browse files Browse the repository at this point in the history
Co-authored-by: wlorenzetti <[email protected]>
  • Loading branch information
wlorenzetti and wlorenzetti authored Jan 4, 2024
1 parent a15303f commit d176c54
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 d176c54

Please sign in to comment.