add exception filter when user not connected default to needing authentication and apply anonymous to some actions add user in get requests add user relation in link, comment and vote signup and in are ok now!
14 lines
445 B
Plaintext
14 lines
445 B
Plaintext
@model HN.Application.CommentDto
|
|
|
|
<span>@Model.Content</span>
|
|
<div>
|
|
👍: @Model.UpVotes / 👎: @Model.DownVotes
|
|
</div>
|
|
|
|
@if (User.Identity.IsAuthenticated) {
|
|
<form asp-action="Vote" asp-controller="Comments" asp-route-id="@Model.Id" method="post">
|
|
<input type="hidden" name="redirectTo" value="@Context.Request.Path" />
|
|
<input type="submit" name="type" value="up" />
|
|
<input type="submit" name="type" value="down" />
|
|
</form>
|
|
} |