Revision samopisnogo website in PHP
There is a site on PHP samopisnom engine, all the code is commented out.
Is admin with different rights – view orders only, full access, limited.
User information is in the database (screenshot of the table attached)
The restriction on viewing of certain pages looks like this (screen file layout of the main page admin attached)
The problem itself is the following:
1) you Need to create a new user group – "Management"
I create for example 3 a new user with the status of Manager, Ivan, Anton, Catherine
The group has the right only to view the topic "Retail stores", edit, and delete store cannot
2) On the "Retail stores" (screen attached)
You must add the column "Managers", each store has its own cell in which a dropdown list of users in the group "Manager"
That is, at the store, "Chelyabinsk, Blucher 42" the Manager Anton, the store of Lipetsk, factory 1 Manager Ivan and so in the end, each store must be assigned to the Manager. Accordingly, one Manager can be assigned to an unlimited number of stores, but the store can only have 1 Manager.
3) the Group Manager should initially have permissions to view the page and selecting managers.
That is, managers go to admin panel and choose your name for the stores in which they are assigned.
A week later, when all will choose, it is necessary to limit the rights of the group "Manager" view-only those stores for which they are assigned. Edit anything already can not.
It may be easier to initially create a group "Manager" with view-only permissions of its stores and to create a separate user who can assign managers. We will issue a managers user rights for appointment of the managers of the store, and then they will have with management of the stores to view the list of stores for which they are assigned.
10.03.2020 11:51