Permissions & Authorization for Users #24
Initial Release; Includes Database and MVC refactoring
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
using Disco.Models.Repository;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Disco.Models.Authorization
|
||||
{
|
||||
public interface IAuthorizationToken
|
||||
{
|
||||
User User { get; set; }
|
||||
List<string> GroupMembership { get; set; }
|
||||
List<IRoleToken> RoleTokens { get; set; }
|
||||
|
||||
bool HasAny(params string[] ClaimKeys);
|
||||
bool HasAny(IEnumerable<string> ClaimKeys);
|
||||
bool HasAll(params string[] ClaimKeys);
|
||||
bool HasAll(IEnumerable<string> ClaimKeys);
|
||||
bool Has(string ClaimKey);
|
||||
|
||||
void Require(string ClaimKey);
|
||||
void RequireAll(params string[] ClaimKeys);
|
||||
void RequireAny(params string[] ClaimKeys);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user