//
// Copyright (c) alveus.dev. All rights reserved. Licensed under the MIT License.
//
using Astral.Core.Constants;
namespace Astral.Core.Extensions;
///
/// extensions.
///
public static class UserRoleExtensions
{
///
/// Get accessible roles of a user role.
///
/// This .
/// Collection of accessible .
public static UserRole[] GetAccessibleRoles(this UserRole userRole)
{
return userRole switch
{
UserRole.User => [UserRole.User],
UserRole.Admin => [UserRole.User, UserRole.Admin],
_ => []
};
}
}