You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Imagine, I'm doing SaaS project and I have companies
Each company has their subdomain so their users can open and get info about company (show function, show policy)
But I also have admin panel where I do request to get companies list (index function, index policy)
So I wanna set my show policy to true for everyone who trying to get info about the company
But I wanna restrict index method so I'll be able to do request from only CEO profile or from admin panel
But, restify generating only one policy method for 2 functions, so turns out, it is impossible to do that. Am I right?
So I wanna suggest to split it to two policy methods
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Imagine, I'm doing SaaS project and I have companies
Each company has their subdomain so their users can open and get info about company (show function, show policy)
But I also have admin panel where I do request to get companies list (index function, index policy)
So I wanna set my show policy to true for everyone who trying to get info about the company
But I wanna restrict index method so I'll be able to do request from only CEO profile or from admin panel
But, restify generating only one policy method for 2 functions, so turns out, it is impossible to do that. Am I right?
So I wanna suggest to split it to two policy methods
Beta Was this translation helpful? Give feedback.
All reactions