Skip to content

Conversation

@pheus
Copy link
Contributor

@pheus pheus commented Sep 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.

Introduces cloning functionality for ObjectPermission objects using the
CloningMixin. Updates the constraints field handling, adds JSONField,
and introduces logic to process initial data for cloned objects.

Fixes netbox-community#15492
@pheus pheus marked this pull request as ready for review September 15, 2025 14:18
@jeremystretch jeremystretch requested review from a team, bctiemann and jeremystretch and removed request for a team and bctiemann September 15, 2025 16:54
Copy link
Member

@jeremystretch jeremystretch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @pheus!

@jeremystretch jeremystretch merged commit 34b111b into netbox-community:main Sep 15, 2025
7 checks passed
@pheus pheus deleted the 15492-add-objectpermission-cloning-support branch September 15, 2025 17:57
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Copying of Admin->Authentication->Permissions

2 participants