How to solve the display policy

Source: Internet
Author: User
Display policy web management system: A user management, B financial management, CCC management, DDD management, EEE management, and FFF management. Currently, there are 4 shared administrators (a1, a2, a3, and a4). their roles and responsibilities are different. How to implement this? a1 operations, column A, column B, and others are not displayed; a2 operations, column B, and column C. Its display policy
Web management system:
A user management, B financial management, CCC management, DDD management, EEE management, and FFF management.

Currently, there are 4 shared administrators (a1, a2, a3, and a4). their roles and responsibilities are different.
How to implement this? a1 operations, column A, and Column B are not displayed;
A2 operation, column B, and column C. Others are not displayed
A3 administrators can operate on topics C and C. Others are not displayed,
The a4 administrator can operate on columns D and E. Others are not displayed,

------ Solution --------------------
PHP code
Add menu columns to an array; $ menu = array ("A user management", "B financial management", "CCC management", "DDD management", "EEE management ", "FFF management"); assign different permissions to different administrators: a1-> $ menu [0], $ menu [1]; a2-> $ menu [1], $ menu [2]; a3-> $ menu [2]; a4-> $ menu [3], $ menu [4]; when the administrator logs on, the administrator's permissions are determined. only the permissions of the administrator are displayed.
------ Solution --------------------
PHP code
$ Menu = array (1 => "A user management", "B financial management", "CCC management", "DDD management", "EEE management ", "FFF management"); $ user = array ('A1' => array (1, 2), 'A2 '=> array (2, 3 ), 'A3 '=> array (3), 'A4' => array (4, 5),); $ u = 'A2 '; foreach (array_intersect ($ user [$ u], array_keys ($ menu) as $ I) echo"{$ Menu [$ I]}";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.