Repository navigation
User Experience Improvements #1059
Replies: 10 comments 5 replies
|
What are everyone's thoughts on creating a webERP V6 branch in the project (i.e. Tim's repo) for these user experience improvements? The justification for a new release number is the removal of the user-based menu system leaving only the role-based menu system. I would continue contributing to the V6 branch and any who wish to continue using the user-based menu system are welcome to backport any features from the V6 branch that are desired. P.S. I updated the feature descriptions in the initial post for clarity. |
|
i think we still have many open issues in v5.0 to start a new v6.0 ;-) "role based menu" is not new. It has been always like this. The only new bit, would be our proposal of removing the manual module assignation by user to be module assignation depending on scripts available. It will clear some current inconsistencies, we already discussed in this and other issues. R |
|
Just fyi, the initial post was edited as thoughts matured. @andrewcouling, since you are one of the three users Tim has given webERP merge access to (iiuc only you, @pakricard and me), do you have any thoughts on creating a v6 branch that breaks with v5 by removing user-based menus? |
|
Since supporting only the database-backed role-based menu system would be a breaking change with v5, I thought it worth repeating it would also (imho) add significant value by resolving conflicts in the current menu system. The database-backed menu system with an expanded Menu Editor could be a major feature and significant differentiator for webERP, allowing an admin to easily create unique modules and menus for as many roles as an organization needs. Iiuc, the current system combines three separate mechanisms:
The first two control navigation, not authorization. Their main conflict is that the user flags are positional, while role menus are database-ordered. How the menu is built
Differences and conflicts
Key problems
Copilot's Direction Keep security tokens as the authorization authority. If individual tab preferences are still wanted, store them by stable modulelink, not position, and treat them explicitly as visibility preferences. Otherwise, make the role menu the sole navigation definition and remove the per-user tab controls after migrating existing preferences. |
|
I pondered having WWW_Access.php populate the role menu when creating a role (I noticed it was Copilot's preference) but now I strongly prefer MenuEditor.php on the basis that creating a role does not necessaraily create a menu system. This distinguishes between the authority to define a role and the authority to create a menu system for it (although practically an admin will have access to both so there is no difference but would be useful in a finer-grained security model #1039) On this basis, the Menu Editor also needs to have the ability to 1. create (initialize) the menu system for a role and 2. delete (un-initialize) it (although delete may be useful only for testing). However, when creating a role, WWW_Access could provide a notice and links similar to when one is notified the price and cost must be setup for a new product (iirc, or something like it). If a role is being deleted by WWW_Access, should it a) remove the role menu if one exists, or b) direct the user to first delete the role menu with a link to the Menu Editor. What if WWW_Access could call the Menu Editor using URL e.g. "MenuEditor.php?DeleteRole=10"? |
|
Hi @dalers : As I pointed out in #352 I am not a fan of having a menu per for each role. @timschofield and you like the idea, but to me, it adds unnecessary complications and maintenance. So, on my webERP I simplified this, and I have one single menu for everybody, not by role.
Any approach is valid as long as the DB does not end up with menu entries for a role that does not exist anymore, otherwise the DB would end up with orphaned rows. |
|
My webERP has currently 121 users, 23 user roles, 106 security tokens, 554 securitygroups (tokens assigned to roles), 621 scripts. So having just one menu for everybody makes life easy to control. In fact, I removed the role completely from my menuitems table (and related code from MenuEditor.php:
Access rights are assigned following the relationship:
I do not see any need to add another layer of complexity with the user roles on the menu options. I think #1052 and removing modulesallowed from user or role, and assigning them dynamically) is the best option. Anyway, as usual, I'll accept the majority as my business need might not be the mainstream for webERP ;-) I am happy with my setup, but some people (as Tim) preferred it by role. Anyway, it does not change the ideas discussed in #1052 regarding simplifying modules allocation to users. R |
|
Going back to your original post, I think:
This can't hurt v5. It is an incremental improvement.
As discussed in other issues, I think the right approach is getting rid of modulesallowed. If this is not a consensus idea, then having modulesallowedas a column of the user role is a big improvement. It could also go into v5.
I created those reports to help me define easily who has access where (scripts) ;-) It worked for me.
This should go into v5. It is a security improvement.
This should go into v5. It is an incremental improvement.
It is already in v5 Basically, IMHO there is no enough changes to justify the branching, maintaining 2 development branches, etc. I favour continuing the development of current v5. R |
|
Hi @pakricard (I hope you don't mind I edited your reply to number the improvements the same as my now-edited-again original post - it was easier to confirm your comments vs categories).
I agree that you likely have unique needs, but you also have experience using webERP in a non-trivial organization, so your perspective will have broad value for others. Your finding that flexible, database-backed per-role menus were too complicated in practice and required extra effort to simplify deserves serious consideration in deciding project direction. I will stop proposing v6 and focus on submitting PRs to v5 for the changes you agree with. I expect to issue the PRs in the coming week (1st week of December), I'm hoping you will be able to review and merge to have a project "check and balance". Btw, we may need to change from majority agreement to unanimous agreement if no one else wants to express an opinion...
I agree, does that mean there is majority agreement now? What do you think a path to move forwards on might be?
Can you clarify what you consider is already in v5? I must be missing something, I created these custom updates to initialize the role menu for a new created role and to remove per-user menus, which I thought was unique to my situation. Add to "6. Other"I reviewed the branches in my fork for the promised additions to "6. Other". Some of the following may duplicate my original post and I apologise for not spending more time reviewing them before posting ;-)
|
menu by role or single menu
So, no need to complicate system administration with an extra layer not adding any real protection. But again, this is Tim's webERP and his call was clearly different. I would prefer for him to express his POV before overstepping him on this. modulesallowed is not needed
Custom DB updates was already committed in 8b75564 and f223e93, unless you have something else pending. That's why I assume it is already in v5. BTW: About editing my posts for clarity!... Sure, no worries. ;-) R |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I now have a number of user experience and usability improvements in my fork (https://github.com/dalers/webERP/tree/mainnew) and want to know if anyone would like them merged back upstream into the project repo (i.e. TIm's) and also what the best strategy might be.
Submitting one PR is obviously the simplest but also the riskiest because not all changes may be desired, migrating from an overlapping user-specific and role-based menu system to a role-based menu system only is likely the most controversial of the "improvements"). I'm hoping to provoke discussion on the "improvements", their benefit and how best to package them for PRs. Please send suggestions/opinions for next step and strategy.
• 1. Login: return to approved product or indented-BOM links after login. session.php has a hard-coded list of acceptable scripts (currently SelectProduct.php and BOMIndented.php) that can be posted to after authentication if a StockID is provided in the URL, I envision this concept being extended to Suppliers and Customers to complete the trifecta (counting Items and their BOMs as one).
• 2. Menus: now exclusively use role-token filtering in index.php, selection pages, and WhereUsedInquiry.php and settings removed from WWW_Users.php. Modules and menu links are shown according to the user’s security tokens rather than individual user module-visibility settings. SelectProduct.php, SelectCustomer.php and SelectSupplier.php hide links to pages the user's role does not have a token for. Resolves issues #1038 and #1042 (also see related discussion #1052).
For a complete user experience, the Menu Editor will need to include creating and deleting modules and editing module names. The menu system also needs to be initialized for for a new user/security role (a custom update is included as a workaround) which could be done in the Menu Editor or in WWW_Access.php when a new role is created,
I assume the existing [Scripts by Security Tokens Report] and [User Roles by Security Tokens Report] are sufficient for auditing requirements on the basis that the menu system is separate from and unrelated to whether a user is permitted to run a script - and as a result does not require auditing.
• 3. Security: $AllowAnyone permission and form-check fix in session.php to prevent authenticated users from accessing scripts they do not have the required security token for.
• 4. Product Link: SelectProduct.php now has a “copy me” link and reports if a part number provided in a URL variable does not exist (e.g.
https://weberp.server/SelectProduct.php?StockID=1234-5678), which resolves issue #1058.• 5. Custom updates: additions: guest-role menu setup (#1042) and a database-update-number reset script (workaround for issue #1043) in sql/updates-custom/. These are the start of a scripted update to migrate a site from user-specific to role-based menu control.
• 6. Other: menu-security tests and documentation and an installer message correction (and a few more needing to be merged from my now abandoned new PLM module branch).
I think I'm done with dev now for a couple weeks, there are some other non-software-related projects needing attention and I will have to find time somehow to work any PRs through the system, get more design and manufacturing process data and documents entered into my production system and try for more "let's look that up in webERP" sessions with users when an opportunity arises.
All reactions