Fixup website content deletion permissions

This commit is contained in:
Slendy 2022-12-19 17:32:37 -06:00
commit 1b69f6a0e0
No known key found for this signature in database
GPG key ID: 7288D68361B91428
2 changed files with 4 additions and 6 deletions

View file

@ -122,7 +122,7 @@
@foreach (Photo photo in Model.Photos)
{
string width = isMobile ? "sixteen" : "eight";
bool canDelete = Model.User != null && (Model.User.IsModerator || Model.User.UserId == photo.CreatorId || Model.User.UserId == Model.Slot?.SlotId);
bool canDelete = Model.User != null && (Model.User.IsModerator || Model.User.UserId == photo.CreatorId);
<div class="@width wide column">
@await photo.ToHtml(Html, ViewData, language, timeZone, canDelete)
</div>
@ -147,7 +147,7 @@
"isMobile", isMobile
},
{
"CanDelete", (Model.User?.IsModerator ?? false) || Model.Slot?.CreatorId == Model.User?.UserId
"CanDelete", Model.User?.IsModerator ?? false
},
})
</div>