Closes #15492: Add support for cloning ObjectPermission objects #1248

Closed
opened 2026-04-05 22:35:47 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 9/14/2025

Fixes: #15492

Summary
Add a Clone action to Admin → Authentication → Permissions. Clicking Clone opens the create form pre‑populated from an existing permission (name cleared), making it quick to duplicate rules without re‑entering object types, actions, and constraints.

Implementation

  • Enable cloning for ObjectPermission via CloningMixin.
  • Add a Clone button to the permission detail view.
  • Provide initial form data from the source permission, including constraints.
*Originally created by @pheus on 9/14/2025* <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #15492 **Summary** Add a **Clone** action to **Admin → Authentication → Permissions**. Clicking **Clone** opens the create form pre‑populated from an existing permission (name cleared), making it quick to duplicate rules without re‑entering object types, actions, and constraints. **Implementation** - Enable cloning for `ObjectPermission` via `CloningMixin`. - Add a **Clone** button to the permission detail view. - Provide `initial` form data from the source permission, including `constraints`.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#1248