a web resource authorisation
This commit is contained in:
@ -65,7 +65,7 @@ public class PermissionHandler : IAuthorizationHandler
|
|||||||
else
|
else
|
||||||
if (resource is DefaultHttpContext httpContext)
|
if (resource is DefaultHttpContext httpContext)
|
||||||
{
|
{
|
||||||
if (httpContext.Request.Path.StartsWithSegments("/Blogspot/Delete", StringComparison.OrdinalIgnoreCase))
|
if (httpContext.Request.Path.StartsWithSegments("/blogpost/Delete", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
string postId = (string)httpContext.GetRouteValue("id");
|
string postId = (string)httpContext.GetRouteValue("id");
|
||||||
if (long.TryParse(postId, out long id))
|
if (long.TryParse(postId, out long id))
|
||||||
|
Reference in New Issue
Block a user