I am building an application in ASP.Net MVC to log tasks.
A user can delete only their own tasks. Is there a standard way to prevent a different logged in user, from simply typing in the delete controller url, with an [id] parameter of a task that belongs to another user, thus deleting another users task?
Example:
User A has a task with an id of 13. When User A views the task, there is a link to /tasks/delete/13 to delete the task record. User B can view task 13 and then decides to enter /tasks/delete/13 into the address bar and therefore deletes User A's task.
Do you have to write your own code within the controller to prevent this, or is there a standard way this is usually handled?
Many thanks!