tgstation-server 6.12.0
The /tg/station 13 server suite
Loading...
Searching...
No Matches
ISystemIdentity.cs
Go to the documentation of this file.
1using System;
2using System.Threading;
3using System.Threading.Tasks;
4
6{
10 public interface ISystemIdentity : IDisposable
11 {
15 string Uid { get; }
16
20 string Username { get; }
21
25 bool CanCreateSymlinks { get; }
26
31 bool IsSuperUser { get; }
32
38
45 Task RunImpersonated(Action action, CancellationToken cancellationToken);
46 }
47}
Represents a user on the current global::System.Runtime.InteropServices.OSPlatform.
ISystemIdentity Clone()
Clone the ISystemIdentity creating another copy that must have IDisposable.Dispose called on it.
string Uid
A unique identifier for the user.
bool CanCreateSymlinks
If this system identity has permissions to create symlinks.
bool IsSuperUser
Is this identity a SuperUser for the OS. See Administrator on Windows or root on Linux.
Task RunImpersonated(Action action, CancellationToken cancellationToken)
Runs a given action in the context of the ISystemIdentity.