Class ServerGrant
- Namespace
- McServerLauncher.Models
- Assembly
- McServerLauncher.dll
What a member was given: a role plus the changes made to it for this one person.
public sealed record ServerGrant : IEquatable<ServerGrant>
- Inheritance
-
ServerGrant
- Implements
- Inherited Members
Remarks
This is what gets stored and sent. What the person can actually do is computed from it by Effective(ServerGrant) and never stored, so changing what a role means takes effect on everybody without touching a single record.
Constructors
ServerGrant(ServerRole, ServerPermission, ServerPermission)
What a member was given: a role plus the changes made to it for this one person.
public ServerGrant(ServerRole Role, ServerPermission Added = ServerPermission.None, ServerPermission Removed = ServerPermission.None)
Parameters
RoleServerRoleThe role they started from.
AddedServerPermissionPermissions switched on beyond the role.
RemovedServerPermissionPermissions switched off from the role. Wins over
Added.
Remarks
This is what gets stored and sent. What the person can actually do is computed from it by Effective(ServerGrant) and never stored, so changing what a role means takes effect on everybody without touching a single record.
Properties
Added
Permissions switched on beyond the role.
public ServerPermission Added { get; init; }
Property Value
Removed
Permissions switched off from the role. Wins over Added.
public ServerPermission Removed { get; init; }
Property Value
Role
The role they started from.
public ServerRole Role { get; init; }