tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
TgsGraphQLAuthorizeAttribute.cs
Go to the documentation of this file.
1using System;
3using System.Linq;
4
6
8
10{
14#pragma warning disable CA1019
16 sealed class TgsGraphQLAuthorizeAttribute : AuthorizeAttribute
17 {
21 public RightsType? RightsType { get; }
22
30
37 {
38 RightsType = Api.Rights.RightsType.Administration;
39 }
40
47 {
48 RightsType = Api.Rights.RightsType.InstanceManager;
49 }
50
60
70
80
87 {
88 RightsType = Api.Rights.RightsType.DreamDaemon;
89 }
90
100
107 {
108 RightsType = Api.Rights.RightsType.Configuration;
109 }
110
117 {
118 RightsType = Api.Rights.RightsType.InstancePermissionSet;
119 }
120
132 }
133}
Helper for using the AuthorizeAttribute with the Api.Rights system.
const string UserEnabledRole
Role used to indicate access to the server is allowed.
TgsGraphQLAuthorizeAttribute(AdministrationRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(DreamDaemonRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(ConfigurationRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(DreamMakerRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute()
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(RepositoryRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(InstancePermissionSetRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(IEnumerable< string > roleNames)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(ChatBotRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(EngineRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
TgsGraphQLAuthorizeAttribute(InstanceManagerRights requiredRights)
Initializes a new instance of the TgsGraphQLAuthorizeAttribute class.
ChatBotRights
Rights for chat bots.
ConfigurationRights
Rights for Models.IConfigurationFiles.
@ List
User may list files if the Models.Instance allows it.
DreamMakerRights
Rights for deployment.
RightsType
The type of rights a model uses.
Definition RightsType.cs:7
EngineRights
Rights for engine version management.
RepositoryRights
Rights for the git repository.
InstancePermissionSetRights
Rights for an Models.Instance.
DreamDaemonRights
Rights for managing DreamDaemon.
InstanceManagerRights
Rights for managing Models.Instances.
AdministrationRights
Administration rights for the server.