Role permissions in custom app

Hi,
How I can export custom roles to my custom app for example:
I have a role with the name PMO I want to give him access to some doctypes with make it in a custom app,
becuase with every new release this access was deleted

Dear @Omar_Mohammed , The correct way to do this is Customise the Customer Agreement doctype and add PMO role inside the Doctype and export it with custom app.

4 Likes

Add this on hooks.py of your custom app

fixtures = [
    "Role",
    "Custom DocPerm",
]

Then you use bench export-fixtures so that it generates the information to be imported automatically when you install the app, etc.

3 Likes

Thank you @ErpnextRaja @jls for the solutions.

1 Like