54 authenticationContext,
74#pragma warning disable CA1506
82 .Where(
x =>
x.Id ==
model.PermissionSetId)
83 .Select(
x =>
new Models.PermissionSet
99 .Select(
x =>
x.CanonicalName)
102 if (
userCanonicalName == Models.User.CanonicalizeName(Models.User.TgsSystemUserName))
115 PermissionSetId =
model.PermissionSetId,
126 return this.Created(
dbUser.ToApi());
128#pragma warning restore CA1506
142#pragma warning disable CA1506
151 .SelectMany(
x =>
x.InstancePermissionSets)
152 .Where(
x =>
x.PermissionSetId ==
model.PermissionSetId)
176#pragma warning restore CA1506
206 .SelectMany(
x =>
x.InstancePermissionSets)
207 .OrderBy(
x =>
x.PermissionSetId))),
232 .SelectMany(
x =>
x.InstancePermissionSets)
233 .Where(
x =>
x.PermissionSetId ==
id)
235 if (permissionSet ==
default)
237 return Json(permissionSet.ToApi());
258 .SelectMany(
x =>
x.InstancePermissionSets)
259 .Where(
x =>
x.PermissionSetId ==
id)
virtual ? long Id
The ID of the entity.
Metadata about a server instance.
long PermissionSetId
The EntityId.Id of the PermissionSet the InstancePermissionSet belongs to.
A request to update an instance permission set.
Represents an error message returned by the server.
A response containing an instance permission set.
Represents a paginated set of models.
Routes to a server actions.
const string List
The postfix for list operations.
const string InstancePermissionSet
The instance permission set controller.
readonly IInstanceManager instanceManager
The IInstanceManager for the ComponentInterfacingController.
ApiController for managing InstancePermissionSets.
async ValueTask< IActionResult > GetId(long id, CancellationToken cancellationToken)
Gets a specific Api.Models.Internal.InstancePermissionSet.
ValueTask< IActionResult > List([FromQuery] int? page, [FromQuery] int? pageSize, CancellationToken cancellationToken)
Lists InstancePermissionSets for the instance.
IActionResult Read()
Read the active InstancePermissionSet.
readonly IPermissionsUpdateNotifyee permissionsUpdateNotifyee
The IPermissionsUpdateNotifyee for the InstancePermissionSetController.
async ValueTask< IActionResult > Update([FromBody] InstancePermissionSetRequest model, CancellationToken cancellationToken)
Update the permissions for an InstancePermissionSet.
InstancePermissionSetController(IDatabaseContext databaseContext, IAuthenticationContext authenticationContext, ILogger< InstancePermissionSetController > logger, IInstanceManager instanceManager, IPermissionsUpdateNotifyee permissionsUpdateNotifyee, IApiHeadersProvider apiHeaders)
Initializes a new instance of the InstancePermissionSetController class.
async ValueTask< IActionResult > Create([FromBody] InstancePermissionSetRequest model, CancellationToken cancellationToken)
Create an InstancePermissionSet.
async ValueTask< IActionResult > Delete(long id, CancellationToken cancellationToken)
Delete an InstancePermissionSet.
ComponentInterfacingController for operations that require an instance.
Helper for returning paginated models.
Backend abstract implementation of IDatabaseContext.
DbSet< Instance > Instances
The Instances in the DatabaseContext.
DbSet< InstancePermissionSet > InstancePermissionSets
The InstancePermissionSets in the DatabaseContext.
DbSet< PermissionSet > PermissionSets
The PermissionSets in the DatabaseContext.
Task Save(CancellationToken cancellationToken)
Saves changes made to the IDatabaseContext.A Task representing the running operation.
DbSet< User > Users
The Users in the DatabaseContext.
InstancePermissionSetResponse ToApi()
PermissionSet PermissionSet
The User's effective PermissionSet.
ulong GetRight(RightsType rightsType)
Get the value of a given rightsType .The value of rightsType . Note that if InstancePermissionSet is ...
For creating and accessing authentication contexts.
Receives notifications about permissions updates.
ValueTask InstancePermissionSetCreated(InstancePermissionSet instancePermissionSet, CancellationToken cancellationToken)
Called when a given instancePermissionSet is successfully created.
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.
EngineRights
Rights for engine version management.
RepositoryRights
Rights for the git repository.
InstancePermissionSetRights
Rights for an Models.Instance.
DreamDaemonRights
Rights for managing DreamDaemon.