[PR #4972] [MERGED] #4969: Remove user and group assignment from SecretRoles #12947

Closed
opened 2025-12-29 22:24:32 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/4972
Author: @jeremystretch
Created: 8/7/2020
Status: Merged
Merged: 8/10/2020
Merged by: @jeremystretch

Base: develop-2.9Head: 4969-remove-secretrole-users-groups


📝 Commits (1)

  • e6bc55a #4969: Remove user and group assignment from SecretRole

📊 Changes

13 files changed (+93 additions, -117 deletions)

View changed files

📝 docs/models/secrets/secretrole.md (+0 -2)
📝 netbox/secrets/api/views.py (+4 -6)
📝 netbox/secrets/forms.py (+1 -7)
netbox/secrets/migrations/0009_secretrole_drop_users_groups.py (+20 -0)
📝 netbox/secrets/models.py (+0 -27)
📝 netbox/secrets/tables.py (+1 -1)
netbox/secrets/templatetags/__init__.py (+0 -0)
netbox/secrets/templatetags/secret_helpers.py (+0 -12)
📝 netbox/secrets/tests/test_views.py (+0 -2)
📝 netbox/templates/secrets/inc/secret_tr.html (+9 -16)
📝 netbox/templates/secrets/secret.html (+22 -30)
📝 netbox/templates/secrets/secret_edit.html (+1 -2)
📝 netbox/users/migrations/0009_replicate_permissions.py (+35 -12)

📄 Description

Closes #4969

Proof of concept for the proposal in #4969.

  • Removes the users and groups ManyToManyFields from the SecretRole model and their corresponding logic
  • Updates the permission replication migration to copy user/group assignments from SecretRoles when creating ObjectPermissions for view_secret

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/4972 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 8/7/2020 **Status:** ✅ Merged **Merged:** 8/10/2020 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `develop-2.9` ← **Head:** `4969-remove-secretrole-users-groups` --- ### 📝 Commits (1) - [`e6bc55a`](https://github.com/netbox-community/netbox/commit/e6bc55af858c061616eb2ff610e374e43bf03639) #4969: Remove user and group assignment from SecretRole ### 📊 Changes **13 files changed** (+93 additions, -117 deletions) <details> <summary>View changed files</summary> 📝 `docs/models/secrets/secretrole.md` (+0 -2) 📝 `netbox/secrets/api/views.py` (+4 -6) 📝 `netbox/secrets/forms.py` (+1 -7) ➕ `netbox/secrets/migrations/0009_secretrole_drop_users_groups.py` (+20 -0) 📝 `netbox/secrets/models.py` (+0 -27) 📝 `netbox/secrets/tables.py` (+1 -1) ➖ `netbox/secrets/templatetags/__init__.py` (+0 -0) ➖ `netbox/secrets/templatetags/secret_helpers.py` (+0 -12) 📝 `netbox/secrets/tests/test_views.py` (+0 -2) 📝 `netbox/templates/secrets/inc/secret_tr.html` (+9 -16) 📝 `netbox/templates/secrets/secret.html` (+22 -30) 📝 `netbox/templates/secrets/secret_edit.html` (+1 -2) 📝 `netbox/users/migrations/0009_replicate_permissions.py` (+35 -12) </details> ### 📄 Description ### Closes #4969 Proof of concept for the proposal in #4969. - Removes the `users` and `groups` ManyToManyFields from the SecretRole model and their corresponding logic - Updates the permission replication migration to copy user/group assignments from SecretRoles when creating ObjectPermissions for `view_secret` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:24:32 +01:00
adam closed this issue 2025-12-29 22:24:32 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#12947