namespace OliverBooth.Common.Data;
///
/// Represents a permission.
///
public struct Permission
{
///
/// Represents a permission that grants all scopes.
///
public static readonly Permission Administrator = new("*");
///
/// Initializes a new instance of the struct.
///
/// The name of the permission.
///
/// if the permission is allowed; otherwise, .
///
public Permission(string name, bool isAllowed = true)
{
Name = name;
IsAllowed = isAllowed;
}
///
/// Gets the name of this permission.
///
/// The name.
public string Name { get; }
///
/// Gets a value indicating whether this permission is allowed.
///
/// if the permission is allowed; otherwise, .
public bool IsAllowed { get; }
}