Importing and Exporting Role Permissions Manager

Hi everyone, is there a way to import/export role permissions manager?

1 Like

Hi I am having the same issue,

Would be good if we could export role permission chnges from the development ERPNext instance to the production ERPNext instance.

Anyone can help or give me some directions on?
I tried put ‘Custom Docperm’ in fixtures in hooks.py file.

But seems it will apend the duplicates role permission.

use Data Export and Data Import

1 Like

wow
thanks

How can I export the Role Permissions Manager using the Data Export tool? I couldn’t find it as a doctype in the Data Export options

1 Like

You can download the template using the data import tool. Go to the Data Import tool, select “Custom DocPerm” and download the template as shown in the screenshot below.

Hope this helps.

2 Likes

Exporting ‘Custom DocPerm’ does not export the document name which I have given the custom permissions. The template provided by the Data Import also doesn’t have the document name.

For me the safest solution is to have a SQL script for custom doc permissions. I case this helps you.

The ERPNext version I am using is 11.

1 Like

Hi All,
I have tried the data export tool, with DocType Custom DocPerm , I got some custom permissions but not all the preset permissions coming as default with ver 13.

Any idea how to get the “full” export of the Role Permission matrix please ?

Thanks

1 Like

V13:
On Customize Form → Actions → Export Customizations

There is an option to export the Custom DocPerms for each DocType to a custom app module of your choosing:

Screen Shot 2022-10-09 at 16.57.32

HTH!

1 Like

Why would you want to?

The built-in DocPerms are just that, imported when you run a migrate from the source code json files. If you have started modifying those you’re asking for trouble in maintenance on an upgrade.

But to answer the question, Export the DocPerm table in the same way.