The App Access feature allows administrators to manage user permissions by organizing them into a tree structure with parent and child nodes. Each parent node represents a category of access rights, and child nodes define specific permissions within that category. Users can add, edit, or delete these nodes, providing a flexible way to control what actions users can perform in the app. Changes made in the App Access interface are dynamically updated and submitted to the server, enabling efficient management of access controls across the application.1. Tree Structure of Access Rights#
App Access rights in a hierarchical tree structure component.Access rights are divided into "parent" nodes (main categories) and "child" nodes (subcategories).
Each parent node can contain multiple child nodes representing specific access rights under that category.
Users can expand or collapse nodes to view their children (sub-rights).
2. Add Parent Node#
The "Add Parent Node" button allows users to create a new access right at the parent level.
When clicked, a modal form appears where users can input the name of the new parent access right.
After create, the parent node is added to the tree structure and is initially empty with no child nodes.
Add Parent Node (Light-Mode)
Add Parent Node (Dark-Mode)
3. Add Child Node#
Next to each parent node, there is a "+" button that allows users to add a child access right to that parent node.
When clicked, a modal form appears where users can input the name and code for the new child access right.
After Create, the child node is added under the selected parent node.
Add Child Node (Light-Mode)
Add Child Node (Dark-Mode)
4. Edit Access Rights#
Next to each parent and child node, there is an edit (pencil) button.
When clicked, it opens a modal form where users can modify the name (and code for child nodes) of the access right.
After editing and saving, the updated values are reflected in the tree structure.
5. Delete Access Rights#
Next to each parent and child node, there is a delete (trash) button.
When clicked the selected access right (parent or child) is removed from the tree.
Deleting a parent node will also remove all its child nodes.
6. Submit Access Rights#
At the bottom of the page, there is a "Submit" button.
When clicked, the current structure of access rights is sent to the server for saving.
A modal form for adding and editing both parent and child access rights.
For parents, only the name is required.
For children, both the name and a unique access right code (within 3-10 characters) are required.
The form validates the input before submitting to ensure the necessary information is provided.
8. Fetching Existing Access Rights#
The app fetches existing access rights for the given appId from the server when the component loads.
After adding App Access Rights show in the store's Settings under Access Rights Modified at 2024-10-14 14:37:52