diff --git a/DotBased.AspNet.Authority/Repositories/IAuthorityRepository.cs b/DotBased.AspNet.Authority/Repositories/IAuthorityRepository.cs index 8c0af84..da76f55 100644 --- a/DotBased.AspNet.Authority/Repositories/IAuthorityRepository.cs +++ b/DotBased.AspNet.Authority/Repositories/IAuthorityRepository.cs @@ -2,6 +2,6 @@ namespace DotBased.AspNet.Authority.Repositories; public interface IAuthorityRepository { - public Task GetVersion(); - public Task SetVersion(int version); + public Task GetVersion(); + public Task SetVersion(long version); } \ No newline at end of file diff --git a/DotBased.AspNet.Authority/Repositories/IGroupRepository.cs b/DotBased.AspNet.Authority/Repositories/IGroupRepository.cs index 667f839..e3c6369 100644 --- a/DotBased.AspNet.Authority/Repositories/IGroupRepository.cs +++ b/DotBased.AspNet.Authority/Repositories/IGroupRepository.cs @@ -1,6 +1,6 @@ namespace DotBased.AspNet.Authority.Repositories; -public interface IGroupRepository where TGroup : class where TId : IEquatable +public interface IGroupRepository where TGroup : class { } \ No newline at end of file diff --git a/DotBased.AspNet.Authority/Repositories/RepositoryManager.cs b/DotBased.AspNet.Authority/Repositories/RepositoryManager.cs new file mode 100644 index 0000000..952a7b2 --- /dev/null +++ b/DotBased.AspNet.Authority/Repositories/RepositoryManager.cs @@ -0,0 +1,13 @@ +namespace DotBased.AspNet.Authority.Repositories; + +public class RepositoryManager where TUser : class where TGroup : class +{ + public RepositoryManager(IUserRepository userRepository, IGroupRepository groupRepository) + { + UserRepository = userRepository; + GroupRepository = groupRepository; + } + + public IUserRepository UserRepository { get; set; } + public IGroupRepository GroupRepository { get; set; } +} \ No newline at end of file diff --git a/DotBased.AspNet.Authority/Services/AuthorityManager.cs b/DotBased.AspNet.Authority/Services/AuthorityManager.cs index d5e607a..c313772 100644 --- a/DotBased.AspNet.Authority/Services/AuthorityManager.cs +++ b/DotBased.AspNet.Authority/Services/AuthorityManager.cs @@ -83,11 +83,11 @@ public class AuthorityManager _logger.Debug("{HandledPropCount}/{TotalPropCount} protection properties handled!", handledProperties, props.Count); } - public bool IsPropertieProtected(string propertieName) + public bool IsPropertyProtected(string propertyName) { var protectedProperties = GetProtectedProperties(); - var propertieFound = protectedProperties.Where(propInfo => propInfo.Name == propertieName); - return propertieFound.Any(); + var propertyFound = protectedProperties.Where(propInfo => propInfo.Name == propertyName); + return propertyFound.Any(); } public List GetProtectedPropertiesValues(TModel model)