Skip to content

Commit

Permalink
Append authentication settings to existing configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
jjnesbitt committed Oct 1, 2024
1 parent de9725c commit 9453764
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions uvdat/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,8 @@ def mutate_configuration(configuration: ComposedConfiguration) -> None:
's3_file_field',
]

configuration.AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
'allauth.account.auth_backends.AuthenticationBackend',
'guardian.backends.ObjectPermissionBackend',
)

configuration.REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = [
configuration.AUTHENTICATION_BACKENDS += ['guardian.backends.ObjectPermissionBackend']
configuration.REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] += [
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
]
configuration.REST_FRAMEWORK['DEFAULT_PERMISSION_CLASSES'] = [
Expand Down

0 comments on commit 9453764

Please sign in to comment.