mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-07 22:37:54 +00:00
Large refactor and project restructuring
This commit is contained in:
parent
c10e197c39
commit
6d5004bf54
71 changed files with 1664 additions and 1607 deletions
21
PluralKit.Core/Models/Privacy.cs
Normal file
21
PluralKit.Core/Models/Privacy.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
namespace PluralKit.Core
|
||||
{
|
||||
public enum PrivacyLevel
|
||||
{
|
||||
Public = 1,
|
||||
Private = 2
|
||||
}
|
||||
|
||||
public static class PrivacyExt
|
||||
{
|
||||
public static bool CanAccess(this PrivacyLevel level, LookupContext ctx) =>
|
||||
level == PrivacyLevel.Public || ctx == LookupContext.ByOwner;
|
||||
}
|
||||
|
||||
public enum LookupContext
|
||||
{
|
||||
ByOwner,
|
||||
ByNonOwner,
|
||||
API
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue