export identity-group.service (#8099)

This commit is contained in:
Eugenio Romano 2023-01-04 17:04:57 +01:00 committed by GitHub
parent 6f6af8cd4e
commit a0aab47090
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 33 additions and 18 deletions

View File

@ -17,7 +17,7 @@
import { IdentityGroupModel, IdentityGroupCountModel } from '../models/identity-group.model'; import { IdentityGroupModel, IdentityGroupCountModel } from '../models/identity-group.model';
import { IdentityRoleModel } from '../models/identity-role.model'; import { IdentityRoleModel } from '../models/identity-role.model';
import { IdentityJoinGroupRequestModel } from '../services/identity-user.service.interface'; import { IdentityJoinGroupRequestModel } from '../interfaces/identity-user.service.interface';
export const mockIdentityGroup1 = { export const mockIdentityGroup1 = {
id: 'mock-group-id-1', name: 'Mock Group 1', path: '/mock', subGroups: [] id: 'mock-group-id-1', name: 'Mock Group 1', path: '/mock', subGroups: []

View File

@ -19,7 +19,7 @@ import { Injectable } from '@angular/core';
import { mockIdentityGroups, mockIdentityGroupsCount, mockIdentityRoles } from './identity-group.mock'; import { mockIdentityGroups, mockIdentityGroupsCount, mockIdentityRoles } from './identity-group.mock';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { map } from 'rxjs/operators'; import { map } from 'rxjs/operators';
import { IdentityGroupServiceInterface } from '../services/identity-group.interface'; import { IdentityGroupServiceInterface } from '../interfaces/identity-group.interface';
import { import {
IdentityGroupModel, IdentityGroupModel,
IdentityGroupQueryResponse, IdentityGroupQueryResponse,

View File

@ -25,7 +25,7 @@ import {
IdentityUserQueryResponse, IdentityUserQueryResponse,
IdentityUserPasswordModel, IdentityUserPasswordModel,
IdentityJoinGroupRequestModel IdentityJoinGroupRequestModel
} from '../services/identity-user.service.interface'; } from '../interfaces/identity-user.service.interface';
import { mockIdentityGroups } from './identity-group.mock'; import { mockIdentityGroups } from './identity-group.mock';
import { Observable, of } from 'rxjs'; import { Observable, of } from 'rxjs';
import { map, switchMap } from 'rxjs/operators'; import { map, switchMap } from 'rxjs/operators';

View File

@ -17,14 +17,6 @@
export * from './authentication-interceptor/auth-bearer.interceptor'; export * from './authentication-interceptor/auth-bearer.interceptor';
export * from './mock/authentication.service.mock';
export * from './mock/identity-group.mock';
export * from './mock/identity-group.service.mock';
export * from './mock/identity-user.mock';
export * from './mock/identity-user.service.mock';
export * from './mock/jwt-helper.service.spec';
export * from './mock/oauth2.service.mock';
export * from './guard/auth-guard-base'; export * from './guard/auth-guard-base';
export * from './guard/auth-guard.service'; export * from './guard/auth-guard.service';
export * from './guard/auth-guard-ecm.service'; export * from './guard/auth-guard-ecm.service';
@ -32,14 +24,15 @@ export * from './guard/auth-guard-bpm.service';
export * from './guard/auth-guard-sso-role.service'; export * from './guard/auth-guard-sso-role.service';
export * from './services/authentication.service'; export * from './services/authentication.service';
export * from './services/identity-group.interface';
export * from './services/identity-role.service'; export * from './services/identity-role.service';
export * from './services/identity-user.service'; export * from './services/identity-user.service';
export * from './services/identity-group.service';
export * from './services/jwt-helper.service'; export * from './services/jwt-helper.service';
export * from './services/oauth2.service'; export * from './services/oauth2.service';
export * from './services/identity-user.service.interface'; export * from './interfaces/identity-user.service.interface';
export * from './interfaces/identity-group.interface';
export * from './interfaces/openid-configuration.interface';
export * from './models/oauth-config.model'; export * from './models/oauth-config.model';
export * from './models/redirection.model'; export * from './models/redirection.model';
@ -48,5 +41,4 @@ export * from './models/identity-group.model';
export * from './models/identity-user.model'; export * from './models/identity-user.model';
export * from './models/identity-role.model'; export * from './models/identity-role.model';
export * from './interfaces/openid-configuration.interface';

View File

@ -27,7 +27,7 @@ import {
IdentityGroupCountModel IdentityGroupCountModel
} from '../models/identity-group.model'; } from '../models/identity-group.model';
import { IdentityRoleModel } from '../models/identity-role.model'; import { IdentityRoleModel } from '../models/identity-role.model';
import { IdentityGroupServiceInterface } from './identity-group.interface'; import { IdentityGroupServiceInterface } from '../interfaces/identity-group.interface';
import { OAuth2Service } from './oauth2.service'; import { OAuth2Service } from './oauth2.service';
@Injectable({ providedIn: 'root' }) @Injectable({ providedIn: 'root' })

View File

@ -22,7 +22,7 @@ import { AppConfigService } from '../../app-config/app-config.service';
import { IdentityGroupModel } from '../models/identity-group.model'; import { IdentityGroupModel } from '../models/identity-group.model';
import { IdentityRoleModel } from '../models/identity-role.model'; import { IdentityRoleModel } from '../models/identity-role.model';
import { IdentityUserModel } from '../models/identity-user.model'; import { IdentityUserModel } from '../models/identity-user.model';
import { IdentityJoinGroupRequestModel, IdentityUserServiceInterface, IdentityUserPasswordModel, IdentityUserQueryCloudRequestModel, IdentityUserQueryResponse } from './identity-user.service.interface'; import { IdentityJoinGroupRequestModel, IdentityUserServiceInterface, IdentityUserPasswordModel, IdentityUserQueryCloudRequestModel, IdentityUserQueryResponse } from '../interfaces/identity-user.service.interface';
import { JwtHelperService } from './jwt-helper.service'; import { JwtHelperService } from './jwt-helper.service';
import { OAuth2Service } from './oauth2.service'; import { OAuth2Service } from './oauth2.service';

View File

@ -0,0 +1,22 @@
/*!
* @license
* Copyright 2019 Alfresco Software, Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export const mockToken = 'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ' +
'zdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiZmFtaWx5X25hbWUiOiJEb2UiLCJnaXZ' +
'lbl9uYW1lIjoiSm9obiIsImFkbWluIjp0cnVlLCJlbWFpbCI6ImpvaG5Eb2VAZ21haWwuY29tIiwicHJ' +
'lZmVycmVkX3VzZXJuYW1lIjoiam9obkRvZTEiLCJqdGkiOiI2MmQ3YjA4NS1hNTJjLTRjZmEtYjA2Zi1' +
'hODFhN2IwNjRjZDIiLCJpYXQiOjE1NDM0MTA0NzcsImV4cCI6MTU0MzQxNTIxM30.pSP86kmX3keuU5E3ndaOUq2TzKdJRsuMnBdFz3Y-UEU';

View File

@ -17,8 +17,9 @@
import { TestBed } from '@angular/core/testing'; import { TestBed } from '@angular/core/testing';
import { TranslateModule } from '@ngx-translate/core'; import { TranslateModule } from '@ngx-translate/core';
import { AlfrescoApiService, JwtHelperService, mockToken, setupTestBed } from '@alfresco/adf-core'; import { AlfrescoApiService, JwtHelperService, setupTestBed } from '@alfresco/adf-core';
import { IdentityUserService } from './identity-user.service'; import { IdentityUserService } from './identity-user.service';
import { mockToken } from '../mock/jwt-helper.service.spec';
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module'; import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
import { import {
mockSearchUserByApp, mockSearchUserByApp,