I have a project that will be used by both admins and users. Is it possible to hide tables bases on a user’s role/team?
I have several tables: Orders, Collections, Admins, Users, Buyers, etc…
I have two types of users: Admins and Users
In the scenario below:
User1 is a part of the admin group/team
User2 is a part of the user group/team
When User1 signs in to the system, she should be able to see all of the tables.
When User2 signs in to the system, I only want him to see the Orders table.
I know I can restrict user access to the routes with the lines below:
if (request.user.team != "Admin") {
response.status(403).send('Sorry, this section is not viewable yet!')
return;
}
As my database grows, users will see continue to see tables they don’t have access too. I think it would be best if we could only display tables they have permissions to access.
Thank you for your feedback @james-janetech . I cannot reproduce this issue, however, I guess it could be something with browser configuration: Forest Admin API code for invitations relies partially on some request headers.
Could you try with another browser (chrome up-to-date, without extension)?
@james-janetech I’m glad it resolved your issue. However it seems there is a problem on our side , since it should have worked. I opened an issue on our bug tracker.