admin users can not be deleted
This commit is contained in:
@@ -25,3 +25,10 @@ class UserExistException(APIException):
|
||||
status_code = status.HTTP_403_FORBIDDEN
|
||||
default_detail = _('کاربری با این شماره موبایل یا با این نام کاربری از قبل وجود دارد') # noqa
|
||||
default_code = 'user_does_not_exist'
|
||||
|
||||
class AdminDeleteException(APIException):
|
||||
""" admin user can not be deleted """
|
||||
|
||||
status_code = status.HTTP_403_FORBIDDEN
|
||||
default_detail = _('این کاربر ادمین است و قابلیت حذف ندارد') # noqa
|
||||
default_code = 'user_does_not_exist'
|
||||
|
||||
Reference in New Issue
Block a user