Closed dmarinortega closed 8 years ago
Hi, This is already possible, but you need to have two plug calls, like this:
plug :authorize, [roles: ["admin", "user"]] when action in [:index, :show]
plug :authorize, [roles: ["admin"]] when not action in [:index, :show]
Thanks for raising the issue, though. I've made it clearer in the documentation how this can be done. By the way, I've just updated Openmaize to version 0.11, and there are changes to how login and logout is handled - I hope that doesn't cause you too much inconvenience.
Thank you very much for quick response! Happy 2016!
Enhancement proposal for AcessControl:
Will it be possible to do something like:
making explicit for the Access Control that in that controller, admin has privileges to do all operations but user can only do index, or show?