from django.contrib.auth import get_user_model

from nodeconductor.core.permissions import StaffPermissionLogic


User = get_user_model()


PERMISSION_LOGICS = (
    (get_user_model(),  StaffPermissionLogic(any_permission=True)),
)

from django.contrib.auth import get_user_model

from rest_framework.authtoken.models import Token

from nodeconductor.core.permissions import StaffPermissionLogic


User = get_user_model()


PERMISSION_LOGICS = (
    (get_user_model(),  StaffPermissionLogic(any_permission=True)),
    (Token, StaffPermissionLogic(any_permission=True)),
)

Allow deletion of tokens from admin (NC-224)
Allow deletion of tokens from admin (NC-224)

  from django.contrib.auth import get_user_model
+ 
+ from rest_framework.authtoken.models import Token
  
  from nodeconductor.core.permissions import StaffPermissionLogic
  
  
  User = get_user_model()
  
  
  PERMISSION_LOGICS = (
      (get_user_model(),  StaffPermissionLogic(any_permission=True)),
+     (Token, StaffPermissionLogic(any_permission=True)),
  )
  
Allow deletion of tokens from admin (NC-224)
## Code Before:
from django.contrib.auth import get_user_model

from nodeconductor.core.permissions import StaffPermissionLogic


User = get_user_model()


PERMISSION_LOGICS = (
    (get_user_model(),  StaffPermissionLogic(any_permission=True)),
)

## Instruction:
Allow deletion of tokens from admin (NC-224)
## Code After:
from django.contrib.auth import get_user_model

from rest_framework.authtoken.models import Token

from nodeconductor.core.permissions import StaffPermissionLogic


User = get_user_model()


PERMISSION_LOGICS = (
    (get_user_model(),  StaffPermissionLogic(any_permission=True)),
    (Token, StaffPermissionLogic(any_permission=True)),
)
