namespace HopFrame.Security.Services;
public interface IPermissionService {
///
/// Checks for the user to have the specified permission
/// Permission system:
/// - "*" -> all rights
/// - "group.[name]" -> group member
/// - "[namespace].[name]" -> single permission
/// - "[namespace].*" -> all permissions in the namespace
///
/// The permission the user needs
/// rather the user has the permission or not
Task HasPermission(string permission);
///
/// Checks if the user has all the specified permissions
///
/// list of the permissions
/// rather the user has all the permissions or not
Task HasPermissions(params string[] permissions);
///
/// Checks if the user has any of the specified permissions
///
/// list of the permissions
/// rather the user has any permission or not
Task HasAnyPermission(params string[] permissions);
///
/// Checks for the user to have the specified permission
/// Permission system:
/// - "*" -> all rights
/// - "group.[name]" -> group member
/// - "[namespace].[name]" -> single permission
/// - "[namespace].*" -> all permissions in the namespace
///
/// The permission the user needs
/// The user who gets checked
/// rather the user has the permission or not
Task HasPermission(string permission, Guid user);
}