| 12345678910111213141516171819202122232425262728293031 |
- using Microsoft.AspNetCore.Authorization;
- using System;
- using System.Collections.Generic;
- using System.Security.Principal;
- using System.Text;
- namespace GreenTree.Strohrmann.ERP.Services.Authorization
- {
- public interface IAuthorizationService
- {
- /// <summary>
- /// Check wether the user has a specific policy
- /// </summary>
- /// <param name="identity">The user identity.</param>
- /// <param name="policy">The policy to be checked.</param>
- public bool UserHasPolicy(IIdentity identity, string policy);
- /// <summary>
- /// Check wether the user has any policy regarding base data management
- /// </summary>
- /// <param name="identity">The user identity.</param>
- public bool UserHasBasedataPolicy(IIdentity identity);
- /// <summary>
- /// Check wether the user has any policy in a specific category
- /// </summary>
- /// <param name="identity">The user identity.</param>
- /// <param name="category">The category (e.g. 'Customer').</param>
- public bool UserHasCategoryPolicy(IIdentity identity, string category);
- }
- }
|