mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 06:17:55 +00:00
feat: public/private lookup flags, consistency
This commit is contained in:
parent
aacf5909a9
commit
455830a2b5
16 changed files with 44 additions and 40 deletions
|
|
@ -23,7 +23,7 @@ public static class ContextChecksExt
|
|||
|
||||
public static Context CheckSystemPrivacy(this Context ctx, PKSystem target, PrivacyLevel level)
|
||||
{
|
||||
if (level.CanAccess(ctx.LookupContextFor(target))) return ctx;
|
||||
if (level.CanAccess(ctx.LookupContextFor(target.Id))) return ctx;
|
||||
throw new PKError("You do not have permission to access this information.");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue