How to add dynamic permissions to antd

you need to develop a permission function for an antd project. Of course, the real permissions are completed by the background. The front-end part needs to dynamically display some menus according to the permissions and add or delete permissions to the roles. I would like to ask you to share your ideas. The questions are sorted out as follows:

  1. according to the role identity of the logged-in user, some menus are visible and some are not visible.
  2. Administrator users can assign roles to other users and edit the permissions of roles;

the current project uses ant design pro;
Welcome to exchange ideas!

Mar.15,2022

The

menu has a database, background management, front-end request display, and back-end return according to permissions.

The permissions of

roles and the corresponding relationship between permissions and menus exist in the database, so the front-end request interface is fine.


if your role permissions have been specified, you can set authority on the route in router.config.js . The steps are similar to this

.

if there is a change in the role's page permissions (configurable type), you can go directly to the home page and return to the routes format menu to replace the original routes . Refer to the official permission Management

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e4dce2-446ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e4dce2-446ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?