TnmsAdministrationPlatform.Shared 0.0.2

dotnet add package TnmsAdministrationPlatform.Shared --version 0.0.2
                    
NuGet\Install-Package TnmsAdministrationPlatform.Shared -Version 0.0.2
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="TnmsAdministrationPlatform.Shared" Version="0.0.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="TnmsAdministrationPlatform.Shared" Version="0.0.2" />
                    
Directory.Packages.props
<PackageReference Include="TnmsAdministrationPlatform.Shared" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add TnmsAdministrationPlatform.Shared --version 0.0.2
                    
#r "nuget: TnmsAdministrationPlatform.Shared, 0.0.2"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package TnmsAdministrationPlatform.Shared@0.0.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=TnmsAdministrationPlatform.Shared&version=0.0.2
                    
Install as a Cake Addin
#tool nuget:?package=TnmsAdministrationPlatform.Shared&version=0.0.2
                    
Install as a Cake Tool

TnmsAdministrationPlatform

What is this?

It is a common infrastructure for centralized management of administrator information such as permissions.

Features

User Data Management

Administrator information for users is centrally managed using a database.

Node-based Permission Settings

This system adopts node-based permission settings. Nodes have a hierarchical structure, and permissions can be set for each node. This enables flexible access control.

Mechanism

In this system, nodes are defined and utilized as follows:

Examples:

  • tnms.admin
  • tnms.administrationplatform.command.testcommand1
  • tnms.administrationplatform.command.testcommand2

You can also use wildcards to set permissions as shown below:

  • *: Has all permissions
  • tnms.*: All permissions related to tnms
  • tnms.administrationplatform.*: All permissions related to AdministrationPlatform
  • tnms.administrationplatform.command.*: All permissions related to AdministrationPlatform commands

Built-in Permissions

  • tnms.admin: Used to determine whether a user can be targeted in the AdministrationPlatform.
    • Users who do not have this permission cannot target users who do have it.

Usage

Config

TODO

Plugin Development

Dependencies

Install TnmsAdministrationPlatform.Shared from NuGet.

dotnet add package TnmsAdministrationPlatform.Shared

Permission Verification

You can obtain the AdminSystem as follows:

private IAdminManager _adminManager = null!;

public void OnAllModulesLoaded()
{
    var adminSystem = _sharedSystem.GetSharpModuleManager().GetRequiredSharpModuleInterface<IAdminManager>(IAdminManager.ModSharpModuleIdentity).Instance;
    _adminManager = adminSystem ?? throw new InvalidOperationException("TnmsAdministrationPlatform is not found! Make sure TnmsAdministrationPlatform is installed!");
}

You can verify permissions as follows:

When using wildcards, except for root permissions, the permission string must end with .*.

if (_adminManager.ClientHasPermission(player, "node.to.check"))

// Example with wildcard
if (_adminManager.ClientHasPermission(player, "node.to.*"))

// Example with root permission
if (_adminManager.ClientHasPermission(player, "*"))

For more details, please refer to the code documentation.

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on TnmsAdministrationPlatform.Shared:

Package Downloads
TnmsPluginFoundation

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.0.2 378 11/17/2025
0.0.1 318 10/29/2025
0.0.0 231 10/9/2025