mirror of
https://github.com/netbox-community/netbox.git
synced 2025-07-22 20:12:00 -06:00
Remove delete_token permission from TokenDeleteView
This commit is contained in:
parent
205acd2c4d
commit
3502398d1d
@ -15,3 +15,4 @@ NetBox v2.9 replaces Django's built-in permissions framework with one that suppo
|
||||
### Other Changes
|
||||
|
||||
* The `secrets.activate_userkey` permission no longer exists. Instead, `secrets.change_userkey` is checked to determine whether a user has the ability to activate a UserKey.
|
||||
* The `users.delete_token` permission is no longer enforced. All users are permitted to delete their own API tokens.
|
||||
|
@ -3,7 +3,7 @@ import logging
|
||||
from django.conf import settings
|
||||
from django.contrib import messages
|
||||
from django.contrib.auth import login as auth_login, logout as auth_logout, update_session_auth_hash
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin, PermissionRequiredMixin
|
||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||
from django.contrib.auth.models import update_last_login
|
||||
from django.contrib.auth.signals import user_logged_in
|
||||
from django.http import HttpResponseForbidden, HttpResponseRedirect
|
||||
@ -320,8 +320,7 @@ class TokenEditView(LoginRequiredMixin, View):
|
||||
})
|
||||
|
||||
|
||||
class TokenDeleteView(PermissionRequiredMixin, View):
|
||||
permission_required = 'users.delete_token'
|
||||
class TokenDeleteView(LoginRequiredMixin, View):
|
||||
|
||||
def get(self, request, pk):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user