This topic is locked
[SOLVED]

 project with 2 menu

4/15/2020 2:27:06 AM
PHPRunner General questions
G
Grdimitris author

I have a project with 2 menu, one for users and one for administrators. They have a completely different layout. Using permissions is not the solution because there are some utility tables necessary for both groups. Τhe complexity of relationships in tables does not allow the use of permissions. Is it possible depending from security group to have menu or menu1 from designer?

fhumanes 4/15/2020

Hello:
I think that what you intend to do cannot be done with PHPRunner, but also I think that the approach (at least using PHPRunner) is not adequate because the important thing is that users can only use the authorized part and that is not only achieved with 2 different menus.
I advise you to check the power of the event "Get Table Permissions" that also affects the visual options of the application, such as the menu.
Also, that you use the Security API with the "isAdmin" function with which you can configure everything whether the user is "Admin" or not.
Cheers,
Fernando

mbintex 4/15/2020

Why not creating two PHPRunner files and solutions - one "backend" for the admin only and one "frontend" for the users?

G
Grdimitris author 4/15/2020

Fernando, mbinex thank you for your reply

I`ll try to explore table Permissions as Fernando suggests. The easy way is 1 project with 2 menu and 2 builds with different url.

Sergey Kornilov admin 4/15/2020

Using User Group Permissions is the best option. I don't see how some relationships may prevent you from doing this.
Another option that may work.

  1. Create a second menu using Menu Builder and add required items there.
  2. In Page Designer create a copy of the existing menu item. Under the properties of this second menu item choose the second menu.
  3. Use PHPRunner's hideItem() function to hide one of menu objects depending on who is logged in:

    https://xlinesoft.com/phprunner/docs/hideitem.htm
    The problem is that #2 and #3 will need to be repeated on every single List page. This is why I think User Groups Permissions option is better.

G
Grdimitris author 4/16/2020

Thank you Sergey
The second option is enough for now and already tested. Group permissions when project has over 10 tables.