Continuing the discussion from Advanced Use Cases for the Nexus Repository Manager API:
Companies with many development teams often ask us how to automate the creation of the permission model inside of Nexus Repository Manager. The Script API is the best way to create all of these objects as one atomic unit.
Here’s a sample for creating the Content Selector + Permission + Role + User stack: A groovy script to create Content Selectors, privileges, and roles programmatically via the Nexus Repository Manager 3 Scripting API. · GitHub
As mentioned on: https://issues.sonatype.org/browse/NEXUS-13205, we are still working to stabilize the API. The classes and methods may change from release to release. Please comment here or on the ticket to let us know how you’re using those classes and what you’d like to see.