I am new to .NET, MVC and Identity Framework. I noticed that the identification system allows you to provide individual actions using annotations.
[Authorize] public ActionResult Edit(int? Id){
I would like to protect certain actions based on user rights.
Example: A blog application that can only be edited by the user who created the blog post.
With this in mind, is it possible to perform any of the following options? If so, are there resources and examples of how best to achieve?
[Authorize(Entity = "Entry", Permission = "Edit", Id = Id)] public ActionResult Edit(int? Id){
or
[BlogEntryPermission(Permission = "Edit", Id = Id)] public ActionResult Edit(int? Id){
Id blog posts a request.
The best estimate would be any information or referral based on authorization based on rights. Thanks in advance for your help.
mcroteau
source share