|
tgstation-server 6.19.2
The /tg/station 13 server suite
|
ISystemIdentity for windows systems. More...


Public Member Functions | |||||
| WindowsSystemIdentity (WindowsIdentity identity) | |||||
| Initializes a new instance of the WindowsSystemIdentity class. | |||||
| WindowsSystemIdentity (UserPrincipal userPrincipal) | |||||
| Initializes a new instance of the WindowsSystemIdentity class. | |||||
| void | Dispose () | ||||
| ISystemIdentity | Clone () | ||||
Clone the ISystemIdentity creating another copy that must have IDisposable.Dispose called on it.
| |||||
| Task | RunImpersonated (Action action, CancellationToken cancellationToken) | ||||
Runs a given action in the context of the ISystemIdentity.
| |||||
Properties | |
| string | Uid [get] |
| A unique identifier for the user. | |
| string | Username [get] |
| The user's name. | |
| bool | CanCreateSymlinks [get] |
| If this system identity has permissions to create symlinks. | |
| bool | IsSuperUser [get] |
| Is this identity a SuperUser for the OS. See Administrator on Windows or root on Linux. | |
Properties inherited from Tgstation.Server.Host.Security.ISystemIdentity | |
Private Attributes | |
| readonly? WindowsIdentity | identity |
| The WindowsIdentity for the WindowsSystemIdentity. | |
| readonly? UserPrincipal | userPrincipal |
| The UserPrincipal for the WindowsSystemIdentity. | |
| readonly? bool | isAdmin |
| Backing field for IsSuperUser. | |
ISystemIdentity for windows systems.
Definition at line 16 of file WindowsSystemIdentity.cs.
| Tgstation.Server.Host.Security.WindowsSystemIdentity.WindowsSystemIdentity | ( | WindowsIdentity | identity | ) |
Initializes a new instance of the WindowsSystemIdentity class.
| identity | The value of identity. |
Definition at line 49 of file WindowsSystemIdentity.cs.
References Tgstation.Server.Host.Security.WindowsSystemIdentity.identity, and Tgstation.Server.Host.Security.WindowsSystemIdentity.isAdmin.
| Tgstation.Server.Host.Security.WindowsSystemIdentity.WindowsSystemIdentity | ( | UserPrincipal | userPrincipal | ) |
Initializes a new instance of the WindowsSystemIdentity class.
| userPrincipal | The value of userPrincipal. |
Definition at line 62 of file WindowsSystemIdentity.cs.
References Tgstation.Server.Host.Security.WindowsSystemIdentity.userPrincipal.
| ISystemIdentity Tgstation.Server.Host.Security.WindowsSystemIdentity.Clone | ( | ) |
Clone the ISystemIdentity creating another copy that must have IDisposable.Dispose called on it.
Implements Tgstation.Server.Host.Security.ISystemIdentity.
Definition at line 81 of file WindowsSystemIdentity.cs.
References Tgstation.Server.Host.Security.WindowsSystemIdentity.identity.
| void Tgstation.Server.Host.Security.WindowsSystemIdentity.Dispose | ( | ) |
Definition at line 68 of file WindowsSystemIdentity.cs.
References Tgstation.Server.Host.Security.WindowsSystemIdentity.identity, and Tgstation.Server.Host.Security.WindowsSystemIdentity.userPrincipal.
| Task Tgstation.Server.Host.Security.WindowsSystemIdentity.RunImpersonated | ( | Action | action, |
| CancellationToken | cancellationToken | ||
| ) |
Runs a given action in the context of the ISystemIdentity.
| action | The Action to perform, should be simple and not use any Tasks or threading. |
| cancellationToken | The CancellationToken for the operation. |
Implements Tgstation.Server.Host.Security.ISystemIdentity.
References Tgstation.Server.Host.Security.WindowsSystemIdentity.identity.
|
private |
The WindowsIdentity for the WindowsSystemIdentity.
Definition at line 33 of file WindowsSystemIdentity.cs.
Referenced by Tgstation.Server.Host.Security.WindowsSystemIdentity.Clone(), Tgstation.Server.Host.Security.WindowsSystemIdentity.Dispose(), Tgstation.Server.Host.Security.WindowsSystemIdentity.RunImpersonated(), and Tgstation.Server.Host.Security.WindowsSystemIdentity.WindowsSystemIdentity().
|
private |
Backing field for IsSuperUser.
Definition at line 43 of file WindowsSystemIdentity.cs.
Referenced by Tgstation.Server.Host.Security.WindowsSystemIdentity.WindowsSystemIdentity().
|
private |
The UserPrincipal for the WindowsSystemIdentity.
Definition at line 38 of file WindowsSystemIdentity.cs.
Referenced by Tgstation.Server.Host.Security.WindowsSystemIdentity.Dispose(), and Tgstation.Server.Host.Security.WindowsSystemIdentity.WindowsSystemIdentity().
|
get |
If this system identity has permissions to create symlinks.
Implements Tgstation.Server.Host.Security.ISystemIdentity.
Definition at line 25 of file WindowsSystemIdentity.cs.
|
get |
Is this identity a SuperUser for the OS. See Administrator on Windows or root on Linux.
Implements Tgstation.Server.Host.Security.ISystemIdentity.
Definition at line 28 of file WindowsSystemIdentity.cs.
|
get |
A unique identifier for the user.
Implements Tgstation.Server.Host.Security.ISystemIdentity.
Definition at line 19 of file WindowsSystemIdentity.cs.
|
get |
The user's name.
Implements Tgstation.Server.Host.Security.ISystemIdentity.
Definition at line 22 of file WindowsSystemIdentity.cs.