Add discussion api
This commit is contained in:
@@ -6,8 +6,6 @@ from __future__ import unicode_literals
|
||||
from django.conf import settings
|
||||
from rest_framework import permissions
|
||||
|
||||
USERNAME_REPLACEMENT_GROUP = "username_replacement_admin"
|
||||
|
||||
class CanDeactivateUser(permissions.BasePermission):
|
||||
"""
|
||||
Grants access to AccountDeactivationView if the requesting user is a superuser
|
||||
|
||||
@@ -1014,6 +1014,9 @@ class UsernameReplacementView(APIView):
|
||||
|
||||
API will recieve a list of current usernames and their requested new
|
||||
username. If their new username is taken, it will randomly assign a new username.
|
||||
|
||||
This API will be called first, before calling the APIs in other services as this
|
||||
one handles the checks on the usernames provided.
|
||||
"""
|
||||
authentication_classes = (JwtAuthentication, )
|
||||
permission_classes = (permissions.IsAuthenticated, CanReplaceUsername)
|
||||
|
||||
Reference in New Issue
Block a user