-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bug: add missing users repository interface (#5)
- Loading branch information
1 parent
24bda06
commit 818451e
Showing
3 changed files
with
39 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
using ZSecurity.Interfaces; | ||
|
||
namespace ZSecurity.Repositories.Interfaces | ||
{ | ||
/// <summary> | ||
/// Interface for base users repository. | ||
/// </summary> | ||
/// <typeparam name="TActions">The type of the actions.</typeparam> | ||
/// <typeparam name="TUsersKey">The type of the users key.</typeparam> | ||
public interface IBaseUsersRepository<TActions, TUsersKey> | ||
where TActions : class, IActionEntity | ||
where TUsersKey : struct | ||
{ | ||
/// <summary> | ||
/// Determines whether the user has any action asynchronous. | ||
/// </summary> | ||
/// <param name="userID">The user identifier.</param> | ||
/// <param name="actionCodes">The action codes.</param> | ||
/// <returns> | ||
/// <c>true</c> if the user has any of the action codes; otherwise, <c>false</c>. | ||
/// </returns> | ||
/// <exception cref="System.ArgumentNullException">actionCodes</exception> | ||
Task<bool> HasAnyActionAsync(TUsersKey userID, params string[] actionCodes); | ||
|
||
/// <summary> | ||
/// Lists all actions asynchronous. | ||
/// </summary> | ||
/// <param name="userID">The user identifier.</param> | ||
/// <returns>The actions list.</returns> | ||
Task<IEnumerable<TActions>> ListAllActionsAsync(TUsersKey userID); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters