We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6b39732 commit 8b3920cCopy full SHA for 8b3920c
1 file changed
BlazorDiffusion.ServiceInterface/SearchService.cs
@@ -163,6 +163,12 @@ public object Any(SearchArtifacts query)
163
PrimaryArtifact = artifact.ArtifactId == album.PrimaryArtifactId ? 1 : 0,
164
artifact.Id,
165
});
166
+
167
+ var user = Request.GetClaimsPrincipal();
168
+ if (user == null || !(user.IsInRole(AppRoles.Admin) || user.IsInRole(AppRoles.Moderator)))
169
+ {
170
+ q.Where<Artifact>(x => x.Nsfw != true && x.Quality == 0);
171
+ }
172
}
173
else
174
{
0 commit comments