mirror of
https://github.com/Grace-Solutions/PSProxmox.git
synced 2026-08-06 13:27:43 +00:00
37 lines
979 B
C#
37 lines
979 B
C#
using Newtonsoft.Json;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
|
|
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(',').ToList() ?? new List<string>();
|
|
}
|
|
}
|