Projects
We'll make some changes to the files in the 'src/components/projects' folder.
In the 'Projects.js' file, change the column on line 75 to:
The CreateProject component is now behind an AccessGuard component that only displays it if the user has the 'CreateProject' permission on the account.
Also update the ProjectButton component to this:
This will disable the ListGroupItem if the user doesn't have the 'ReadProject' permission on the project.
The above two components are all you need to build a responsive UI that changes according to user permissions.
In the 'Project.js' file, look for the ProjectDashboard component, and wrap the 'Delete Project' button in an AccessGuard like this:
Next, wrap the Permissions component in an AccessGuard like this:
Last updated