mirror of
https://github.com/netbox-community/netbox.git
synced 2026-04-05 00:47:17 +02:00
Remove activate_userkey permission
This commit is contained in:
@@ -23,7 +23,7 @@ class UserKeyAdmin(admin.ModelAdmin):
|
||||
actions = super().get_actions(request)
|
||||
if 'delete_selected' in actions:
|
||||
del actions['delete_selected']
|
||||
if not request.user.has_perm('secrets.activate_userkey'):
|
||||
if not request.user.has_perm('secrets.change_userkey'):
|
||||
del actions['activate_selected']
|
||||
return actions
|
||||
|
||||
|
||||
@@ -56,7 +56,6 @@ class Migration(migrations.Migration):
|
||||
],
|
||||
options={
|
||||
'ordering': ['user__username'],
|
||||
'permissions': (('activate_userkey', 'Can activate user keys for decryption'),),
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
|
||||
@@ -64,9 +64,6 @@ class UserKey(models.Model):
|
||||
|
||||
class Meta:
|
||||
ordering = ['user__username']
|
||||
permissions = (
|
||||
('activate_userkey', "Can activate user keys for decryption"),
|
||||
)
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
|
||||
Reference in New Issue
Block a user