mirror of
https://github.com/Grace-Solutions/PSProxmox.git
synced 2026-08-21 11:56:38 +00:00
Initial commit of PSProxmox module
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using Newtonsoft.Json;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace PSProxmox.Models
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a role in Proxmox VE.
|
||||
/// </summary>
|
||||
public class ProxmoxRole
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the role ID.
|
||||
/// </summary>
|
||||
[JsonProperty("roleid")]
|
||||
public string RoleID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the role's privileges.
|
||||
/// </summary>
|
||||
[JsonProperty("privs")]
|
||||
public string Privileges { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the role is a special role.
|
||||
/// </summary>
|
||||
[JsonProperty("special")]
|
||||
public bool Special { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the role's privileges as a list.
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
public List<string> PrivilegesList => Privileges?.Split(',') ?? new List<string>();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user