account update scope
This commit is contained in:
parent
496dbc481d
commit
506b30096e
2 changed files with 22 additions and 23 deletions
|
|
@ -37,11 +37,11 @@ class UserDetailView(generics.RetrieveAPIView):
|
|||
|
||||
class AccountView(generics.RetrieveUpdateAPIView):
|
||||
serializer_class = AccountSerializer
|
||||
authentication_classes = [OAuth2Authentication]
|
||||
permission_classes = [TokenMatchesOASRequirements]
|
||||
required_alternate_scopes = {
|
||||
"GET": [["accounts.account:retrieve"]],
|
||||
"POST": [["accounts.account:update"]],
|
||||
"PUT": [["accounts.account:update"]],
|
||||
}
|
||||
|
||||
def get_object(self):
|
||||
|
|
|
|||
|
|
@ -107,7 +107,6 @@ TEMPLATES = [
|
|||
]
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
# TODO: where use this?
|
||||
'apps.users.backends.OTPBackend',
|
||||
'django.contrib.auth.backends.ModelBackend',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue