If you have recently checked out our enhancements page, you’ll know that we recently put together new mrc Menu logic that allows developers to assign a user to multiple roles. However, this logic will only be assigned to new menus. In other words, your existing menu will not be affected.
This post will walk you through manually upgrading your existing menu to take advantage of these recent changes.
The first question we need to address is, “How do I know if my menu is using the older or the newer logic?” To answer that question, head over to Admin -> Application Menu and Security. Your screen will look like one of the two screenshots:
If your screen looks like the below, then you are using the new menuing logic and no further action is required.
If your screen looks like the below, then you are using the old menuing logic and this document is for you.
Steps To Upgrade
- Navigate to the m-Power folder on your m-Power application server. From there navigate to your dictionary, via: \m-power\mrcjava\WEB-INF\classes\DATA_DICTIONARY
- Locate all *mrcmenu* files.
- Delete all mrcmenu.java and mrcmenu*.class files. When completed exit out of your m-Power application server.
- Back inside of the m-Power interface, navigate back to Admin, then click again into “Application Menu & Security”. By re-entering this screen, m-Power will create the new mrc menuing files that will utilize the multiple role enhancement.
- Navigate to “Assign Roles to Users” to begin mapping users to any necessary role(s).
Note: Assign Roles to Users will now handle all User to Role mapping, so previously entered roles are no longer valid. If you wish to keep your old roles in place, run the following SQL command, replacing DD with the name of your data dictionary:
insert into DD.MRCSEC5 (USERID, USERROLE) select USERID, USERROLE from DD.MRCSEC1;
- The above change is made per dictionary. If you have multiple dictionaries that need to be migrated, please repeat these steps accordingly.
- While the original user role previously found in “Manage Application Users” is no longer listed on screen, you will still find this information inside of the MRCSEC1 table for your dictionary.
- If a user is mapped to multiple roles and those roles share a particular application, the application will only appear on the menu once. For instance, user Joe is assigned to Admin and Sales. If R00010 is assigned to both Admin and Sales, Joe will only see R00010 on his menu once.
- In the event you have separate development and production databases, you must be sure to copy MRCSEC5 from your development database to any production databases you may use.
- In the event you utilize Application Security, be sure to delete MrcAppSecurity.class and MrcAppSecurity.java from your data dictionary folder. Then navigate back to Admin -> Application Menu and Security. Click “Enable Application Security.” This will load the new logic to allow a user to belong to multiple roles.