In the user interface, the user has the option to choose how many records they want to see on a single page. They can set a specific number to control the amount of information displayed at once.
Furthermore, the system allows the user to filter the records by typing the permission name in a search box. As they type, the relevant records that match the permission name will be dynamically filtered and displayed, making it easier for the user to find specific permissions quickly.
Create Permission
When the user clicks on the "Create Permission" button, they are immediately taken to a form where they can input the necessary information to create a new permission.
The "Create Permission" form consists of two fields: a text field for entering the permission name and a dropdown menu with two options: "Role" and "User." The user can choose between these options to determine whether to assign permission to a specific user role or to an individual user.
In addition to these fields, there are multiple checkboxes available for selecting user roles. Users can choose multiple user roles while creating the permission, allowing them to assign the permission to multiple roles at once.
When the user clicks on the "Submit" button, they are redirected back to the permissions page. A success banner appears, indicating that the permission created was successful.
Important points to think about when making permissions:
There are two kinds of permissions: "ROLE" and "USER".
When you name a permission, you can use the format you're already using (like "view.permissions").
If you choose "ROLE" as the type and pick roles at the bottom, the permission you make will be given to those roles right away.
Edit Permission
When the user clicks on the "Edit" button of a specific permission record, they are directed to the "Edit Permission" form. In this form, the name and type fields are automatically filled with the existing values of the permission. However, the user can update these fields with new values.
Unlike the "Create Permission" form, the checkboxes for selecting user roles are not visible in the "Edit Permission" form.
After the user updates the permission details and clicks on the "Submit" button, they are redirected back to the permissions page. A success banner appears, indicating that the permission update was successful.
In the "Edit Permission" form, just like in the "Create Permission" form, all the fields are required to be filled out. This means that the user must provide information for all the fields before they can successfully update the permission details.
Delete Permission
When the user clicks on the "Delete" button of a permission record, a pop-up message will appear asking for confirmation. If the user clicks on the "OK" button in the pop-up, the record will be deleted, and a success banner will be displayed to confirm the successful deletion.
On the other hand, if the user clicks on the "No" button in the pop-up, nothing will happen to the record, and it will remain unchanged. The deletion process will be canceled, and the user can continue without deleting the record.