feat: config setting to default show/hide private info

This commit is contained in:
spiral
2021-12-06 04:01:42 -05:00
parent 455830a2b5
commit 32bea51e18
14 changed files with 71 additions and 17 deletions

View File

@@ -54,8 +54,7 @@ public static class ContextListExt
// Privacy filter (default is public only)
if (ctx.MatchFlag("a", "all")) p.PrivacyFilter = null;
if (ctx.MatchFlag("private-only", "private", "priv")) p.PrivacyFilter = PrivacyLevel.Private;
if (ctx.MatchFlag("public-only", "public", "pub")) p.PrivacyFilter = PrivacyLevel.Public;
if (ctx.MatchFlag("private-only", "po")) p.PrivacyFilter = PrivacyLevel.Private;
// PERM CHECK: If we're trying to access non-public members of another system, error
if (p.PrivacyFilter != PrivacyLevel.Public && lookupCtx != LookupContext.ByOwner)