mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
18 lines
No EOL
354 B
C#
18 lines
No EOL
354 B
C#
using System;
|
|
|
|
using Microsoft.AspNetCore.Authorization;
|
|
|
|
using PluralKit.Core;
|
|
|
|
namespace PluralKit.API
|
|
{
|
|
public class PrivacyRequirement<T>: IAuthorizationRequirement
|
|
{
|
|
public readonly Func<T, PrivacyLevel> Mapper;
|
|
|
|
public PrivacyRequirement(Func<T, PrivacyLevel> mapper)
|
|
{
|
|
Mapper = mapper;
|
|
}
|
|
}
|
|
} |