idempiere: add all roles to admin

It's a pain to add all the roles to the Admin Role (I had to re-create this role because I messed up the original role and had to hack my way back to the system).

The role is divided in several tables.

ad_window_access
ad_process_access
ad_form_access
ad_workflow_access
ad_task_access
ad_document_action_access
ad_infowindows_access

To recreate all the Roles I created a script using all the windows and an Excel Spreadsheet. You can download the reference below. Make sure you modify it to work with your needs. (You have to modify the ad_role_id to the role you're addining the permissions).

When I finished I noticed that I had not enabled read/write permissions to this roles, but this I was able to do with the following query.

To be able to update the read and write permissions automatically you can execute the following queries (where 1000006 is my Role ID, change it to your Id)

UPDATE ad_window_access SET isreadwrite = 'Y' WHERE ad_role_id = 1000006;
UPDATE ad_process_access SET isreadwrite = 'Y' WHERE ad_role_id = 1000006;
UPDATE ad_form_access SET isreadwrite = 'Y' WHERE ad_role_id = 1000006;
UPDATE ad_workflow_access SET isreadwrite = 'Y' WHERE ad_role_id = 1000006;
UPDATE ad_task_access SET isreadwrite = 'Y' WHERE ad_role_id = 1000006;

 

Leave a Reply

Your email address will not be published. Required fields are marked *