I know it is possible to annotate action methods to control access depending on roles like [Authorize(Roles = "Publisher")]
but how can I achieve the same result if the access control information comes from database and can be changed anytime.
For example: Create
action method can be accessed by Publisher
but cannot be tomorrow because Admin
disallowed Publisher
to Create
. This information will come from database and I have to somehow put appropriate annotation in runtime.
I hope I was able to convey my question properly. Any suggestion is appreciated.