Add a delete lock feature. #3593

Closed
opened 2025-12-29 18:30:02 +01:00 by adam · 1 comment
Owner

Originally created by @kevinreniers on GitHub (Apr 21, 2020).

Environment

  • Python version: 3.6.8
  • NetBox version: 2.7.12

Proposed Functionality

In order to prevent accidental deletion we would like to be able to "lock" resources against deletion and/or updating.

Use Case

Preventing mistakes when a given resource really shouldn't be deleted or updated in any case. I think this is still useful in all cases even when the users are careful. It's all just a matter of time before someone accidentally removes something they shouldn't have removed.

For us, we'll be granting limited write access to other teams or members outside of our team in order to enable orchestration. We want to allow them to delete and update their own prefixes at will, but there are a few that are key to orchestration that they shouldn't have to touch. As such, a lock mechanism could make this easier for us.

Database Changes

A potential implementation could add a lock_type enum to each supported database table indicating the kind of lock we're talking about. Azure, for instance, uses a "CannotDelete" and "ReadOnly" lock.

External Dependencies

None, I think?

Originally created by @kevinreniers on GitHub (Apr 21, 2020). ### Environment * Python version: 3.6.8 * NetBox version: 2.7.12 ### Proposed Functionality In order to prevent accidental deletion we would like to be able to "lock" resources against deletion and/or updating. ### Use Case Preventing mistakes when a given resource *really* shouldn't be deleted or updated in any case. I think this is still useful in all cases even when the users are careful. It's all just a matter of time before someone accidentally removes something they shouldn't have removed. For us, we'll be granting limited write access to other teams or members outside of our team in order to enable orchestration. We want to allow them to delete and update their own prefixes at will, but there are a few that are key to orchestration that they shouldn't have to touch. As such, a lock mechanism could make this easier for us. ### Database Changes A potential implementation could add a lock_type enum to each supported database table indicating the kind of lock we're talking about. Azure, for instance, uses a "CannotDelete" and "ReadOnly" lock. ### External Dependencies None, I think?
adam closed this issue 2025-12-29 18:30:02 +01:00
Author
Owner

@jeremystretch commented on GitHub (Apr 21, 2020):

I doubt we'd implement an arbitrary "deletion lock," but your use case is likely covered by the implementation of role-based access control (#554).

@jeremystretch commented on GitHub (Apr 21, 2020): I doubt we'd implement an arbitrary "deletion lock," but your use case is likely covered by the implementation of role-based access control (#554).
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3593