tgstation-server
The /tg/station 13 server suite
TgsAuthorizeAttribute.cs
Go to the documentation of this file.
1 using System;
2 using Microsoft.AspNetCore.Authorization;
4 
5 namespace Tgstation.Server.Host.Controllers
6 {
10  [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
12  {
16  public TgsAuthorizeAttribute() { }
17 
22  public TgsAuthorizeAttribute(AdministrationRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
23 
28  public TgsAuthorizeAttribute(InstanceManagerRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
29 
34  public TgsAuthorizeAttribute(RepositoryRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
35 
40  public TgsAuthorizeAttribute(ByondRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
41 
46  public TgsAuthorizeAttribute(DreamMakerRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
47 
52  public TgsAuthorizeAttribute(DreamDaemonRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
53 
58  public TgsAuthorizeAttribute(ChatBotRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
59 
64  public TgsAuthorizeAttribute(ConfigurationRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
65 
70  public TgsAuthorizeAttribute(InstanceUserRights requiredRights) => Roles = RightsHelper.RoleNames(requiredRights);
71  }
72 }
ConfigurationRights
Rights for Models.ConfigurationFile
ByondRights
Rights for Models.Byond
Definition: ByondRights.cs:9
InstanceUserRights
Rights for an Models.Instance
Helper for using the AuthorizeAttribute with the Api.Rights system
AdministrationRights
Rights for Models.Administration
DreamDaemonRights
Rights for Models.DreamDaemon
InstanceManagerRights
Rights for managing Models.Instances
DreamMakerRights
Rights for Models.DreamMaker
RepositoryRights
Rights for a Models.Repository
ChatBotRights
Rights for Models.ChatBot
Definition: ChatBotRights.cs:9