Browse Source
Merge pull request #7135 from abpframework/auto-merge/rel-4-1/61
Merge branch dev with rel-4.1
pull/7151/head
liangshiwei
6 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with
95 additions and
0 deletions
-
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiResources/IApiResourceRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/ApiScopes/IApiScopeRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/Clients/IClientRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.Domain/Volo/Abp/IdentityServer/IdentityResources/IIdentityResourceRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiResources/ApiResourceRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/ApiScopes/ApiScopeRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/Clients/ClientRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.EntityFrameworkCore/Volo/Abp/IdentityServer/IdentityResources/IdentityResourceRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiResourceRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoApiScopeRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoClientRepository.cs
-
modules/identityserver/src/Volo.Abp.IdentityServer.MongoDB/Volo/Abp/IdentityServer/MongoDB/MongoIdentityResourceRepository.cs
|
|
|
@ -35,6 +35,11 @@ namespace Volo.Abp.IdentityServer.ApiResources |
|
|
|
CancellationToken cancellationToken = default |
|
|
|
); |
|
|
|
|
|
|
|
Task<long> GetCountAsync( |
|
|
|
string filter = null, |
|
|
|
CancellationToken cancellationToken = default |
|
|
|
); |
|
|
|
|
|
|
|
Task<bool> CheckNameExistAsync( |
|
|
|
string name, |
|
|
|
Guid? expectedId = null, |
|
|
|
|
|
|
|
@ -29,6 +29,11 @@ namespace Volo.Abp.IdentityServer.ApiScopes |
|
|
|
CancellationToken cancellationToken = default |
|
|
|
); |
|
|
|
|
|
|
|
Task<long> GetCountAsync( |
|
|
|
string filter = null, |
|
|
|
CancellationToken cancellationToken = default |
|
|
|
); |
|
|
|
|
|
|
|
Task<bool> CheckNameExistAsync( |
|
|
|
string name, |
|
|
|
Guid? expectedId = null, |
|
|
|
|
|
|
|
@ -24,6 +24,11 @@ namespace Volo.Abp.IdentityServer.Clients |
|
|
|
CancellationToken cancellationToken = default |
|
|
|
); |
|
|
|
|
|
|
|
Task<long> GetCountAsync( |
|
|
|
string filter = null, |
|
|
|
CancellationToken cancellationToken = default |
|
|
|
); |
|
|
|
|
|
|
|
Task<List<string>> GetAllDistinctAllowedCorsOriginsAsync(CancellationToken cancellationToken = default); |
|
|
|
|
|
|
|
Task<bool> CheckClientIdExistAsync( |
|
|
|
|
|
|
|
@ -23,6 +23,11 @@ namespace Volo.Abp.IdentityServer.IdentityResources |
|
|
|
CancellationToken cancellationToken = default |
|
|
|
); |
|
|
|
|
|
|
|
Task<long> GetCountAsync( |
|
|
|
string filter = null, |
|
|
|
CancellationToken cancellationToken = default |
|
|
|
); |
|
|
|
|
|
|
|
Task<IdentityResource> FindByNameAsync( |
|
|
|
string name, |
|
|
|
bool includeDetails = true, |
|
|
|
|
|
|
|
@ -68,6 +68,16 @@ namespace Volo.Abp.IdentityServer.ApiResources |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await DbSet |
|
|
|
.WhereIf(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
x.DisplayName.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await (await GetDbSetAsync()).AnyAsync(ar => ar.Id != expectedId && ar.Name == name, GetCancellationToken(cancellationToken)); |
|
|
|
|
|
|
|
@ -48,6 +48,16 @@ namespace Volo.Abp.IdentityServer.ApiScopes |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await DbSet |
|
|
|
.WhereIf(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
x.DisplayName.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await (await GetDbSetAsync()).AnyAsync(x => x.Id != expectedId && x.Name == name, GetCancellationToken(cancellationToken)); |
|
|
|
|
|
|
|
@ -41,6 +41,13 @@ namespace Volo.Abp.IdentityServer.Clients |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await DbSet |
|
|
|
.WhereIf(!filter.IsNullOrWhiteSpace(), x => x.ClientId.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<List<string>> GetAllDistinctAllowedCorsOriginsAsync(CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await (await GetDbContextAsync()).ClientCorsOrigins |
|
|
|
|
|
|
|
@ -55,6 +55,16 @@ namespace Volo.Abp.IdentityServer.IdentityResources |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await DbSet |
|
|
|
.WhereIf(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
x.DisplayName.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<IdentityResource> FindByNameAsync( |
|
|
|
string name, |
|
|
|
bool includeDetails = true, |
|
|
|
|
|
|
|
@ -56,6 +56,16 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
.WhereIf<ApiResource, IMongoQueryable<ApiResource>>(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
x.DisplayName.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)) |
|
|
|
|
|
|
|
@ -53,6 +53,16 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
.WhereIf<ApiScope, IMongoQueryable<ApiScope>>(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
x.DisplayName.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<bool> CheckNameExistAsync(string name, Guid? expectedId = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)) |
|
|
|
|
|
|
|
@ -48,6 +48,14 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
.WhereIf<Client, IMongoQueryable<Client>>(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.ClientId.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<List<string>> GetAllDistinctAllowedCorsOriginsAsync( |
|
|
|
CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
|
|
|
|
@ -30,6 +30,16 @@ namespace Volo.Abp.IdentityServer.MongoDB |
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public async Task<long> GetCountAsync(string filter = null, CancellationToken cancellationToken = default) |
|
|
|
{ |
|
|
|
return await GetMongoQueryable() |
|
|
|
.WhereIf<IdentityResource, IMongoQueryable<IdentityResource>>(!filter.IsNullOrWhiteSpace(), |
|
|
|
x => x.Name.Contains(filter) || |
|
|
|
x.Description.Contains(filter) || |
|
|
|
x.DisplayName.Contains(filter)) |
|
|
|
.LongCountAsync(GetCancellationToken(cancellationToken)); |
|
|
|
} |
|
|
|
|
|
|
|
public virtual async Task<IdentityResource> FindByNameAsync( |
|
|
|
string name, |
|
|
|
bool includeDetails = true, |
|
|
|
|