#Creating multitenancy granular permissions only work after setting everything to `All Access` first.

6 messages · Page 1 of 1 (latest)

ripe gust
#

I have watch Bryan's video for multitenancy(https://www.youtube.com/watch?v=ruzkqxDIG-Y&t=7m23s) on a Directus app. I have done everything absolutely exactly the way he does it and on 3 different projects and everytime I am having the exact same issue.

Create a model -> assign M2O relationship to Users -> Create a role -> assign users to only view their own items -> Log in with a user of that role.

The result is always the following image.

The only way to solve it each time was to delete the custom permission, give full access to the user then recreate the EXACT same permission by not changing anything.

Then everything works.

What can I do to solve this?

broken adderBOT
#

Thanks for posting! This is a community powered server, so you may or may not get an answer based on available help and expertise. To increase your chances of somebody being able to help you, please make sure your question includes the following:

  • An explanation of exactly what you're trying to achieve.
  • Any and all related code or previous attempts.
  • The exact issue or error you are facing.
  • Any screenshots if applicable.

When you're done with this thread, please close it.

(If you have a support agreement and need help, please contact the core team via email.)

broken fossil
#

Paging @waxen seal 🙂

waxen seal
#

On it - will test this again myself - been a while since that video was created

ripe gust
#

Since this is 100% reproducible for me, I added an imgur album here, of the error and the steps (in images) I took to fix it, https://imgur.com/a/3ZqtLi8

ripe gust
#

Solution: Thank you Bryant for your help. Managed to narrow it down.

When setting Custom Permissions for something, going from No Access to Custom Permission caused the problems and the above error. The solution was to create the Custom Permissions by changing it to All Access first then locking it down. That way I don't get the errors.