Skip to content

Commit

Permalink
Fix publication flag editing
Browse files Browse the repository at this point in the history
  • Loading branch information
adelikat committed Mar 3, 2024
1 parent 7a61828 commit 79667e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion TASVideos/Pages/Publications/Edit.cshtml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private async Task UpdatePublication(int id, PublicationEditModel model)
publication.GenerateTitle();

List<int> editableFlags = await _db.Flags
.Where(f => f.PermissionRestriction.HasValue && User.Permissions().Contains(f.PermissionRestriction.Value))
.Where(f => f.PermissionRestriction.HasValue && User.Permissions().Contains(f.PermissionRestriction.Value) || f.PermissionRestriction == null)
.Select(f => f.Id)
.ToListAsync();
List<PublicationFlag> existingEditablePublicationFlags = publication.PublicationFlags.Where(pf => editableFlags.Contains(pf.FlagId)).ToList();
Expand Down

0 comments on commit 79667e1

Please sign in to comment.