Skip to content

Commit

Permalink
Merge pull request #838 from Crown-Commercial-Service/revert-837-p2sp…
Browse files Browse the repository at this point in the history
…rint16

Revert "3046 issues fixed (#836)"
  • Loading branch information
ponselvamsakthivel-bc authored Nov 2, 2022
2 parents 2c42cd4 + 8580e29 commit 98332bc
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ <h2 class="govuk-heading-s"> {{ 'BUYER_SUPPLIER_TYPE' | translate }}</h2>
{{ 'SIGN_IN_PROVIDER'| translate }}
</legend>
<div id="signin-hint" class="govuk-hint" style="color: black;">
{{ idpStatus == false ? 'A sign in provider gives users the option to use a different service to sign in. Sign in providers are set at an
organisational level. Any updates applied here will apply to all of your organisation’s users' : (idpStatus == true ? 'Users can only use a User ID and password to sign in. You may be able to allow additional sign-in methods in the future.' : '')}}
A sign in provider gives users the option to use a different service to sign in. Sign in providers are set at an
organisational level. Any updates applied here will apply to all of your organisation’s users
</div>
<span *ngIf="!isValid && submitted" id="group-error" class="govuk-error-message label-detail-text-gap">
<span class="govuk-visually-hidden">{{ 'ERROR_PREFIX' | translate }}</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ export class ManageOrganisationProfileComponent extends BaseComponent implements
changedIdpList: { id: number, enabled: boolean, connectionName: string, name: string }[] = [];
ccsContactUrl: string = environment.uri.ccsContactUrl;
schemeData: any[] = [];
public idpStatus = environment.appSetting.hideIDP
public detailsData: any = [
'Send messages to multiple contacts in your organisation. You can also send targeted communications to specific users.',
"Manage information about your organisation's specific business locations. For instance, you can add details about your head office and additional sites to organise deliveries.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,9 +291,9 @@ <h2 class="govuk-error-summary__title" id="error-summary-title">
{{ 'SIGN_IN_PROVIDER'| translate }}
</legend>
<span class="sign_in_prov">
{{ idpStatus == false ? 'A sign in provider gives users the option to use a different service to sign in. Sign in
A sign in provider gives users the option to use a different service to sign in. Sign in
providers are set at an organisational level. To update the sign in providers for your
Organisation’s users please go to Manage organisations' : (idpStatus == true ? 'You can only use a User ID and password to sign in. You may be able to use additional sign-in methods in the future.' : '')}}
Organisation’s users please go to Manage organisations
</span>
<span id="group-error" class="govuk-error-message label-detail-text-gap"
*ngIf="submitted && formGroup.hasError('identityProviderRequired')">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { FormBaseComponent } from 'src/app/components/form-base/form-base.compon
import { SessionStorageKey } from 'src/app/constants/constant';
import { PatternService } from 'src/app/shared/pattern.service';
import { WrapperConfigurationService } from 'src/app/services/wrapper/wrapper-configuration.service';
import { environment } from 'src/environments/environment';

@Component({
selector: 'app-manage-user-add-single-user-detail',
Expand All @@ -54,7 +53,6 @@ export class ManageUserAddSingleUserDetailComponent
state: any;
hasGroupViewPermission: boolean = false;
mfaAdminValidationError: boolean = false;
public idpStatus = environment.appSetting.hideIDP
public detailsData: any = [
'Add additional security steps to make an account more secure. Additional security needs to be enabled for all admin users. This can be accessed using a personal or work digital device.',
'Groups allow you to manage large numbers of users all at once. Roles can be applied to groups to organise user’s more efficiently and allow bulk access to relevant services where it is required.',
Expand Down
7 changes: 1 addition & 6 deletions src/app/pages/user-profile/user-profile-component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { FormBaseComponent } from 'src/app/components/form-base/form-base.compon
import { SessionStorageKey } from 'src/app/constants/constant';
import { PatternService } from 'src/app/shared/pattern.service';
import { isBoolean } from 'lodash';
import { environment } from 'src/environments/environment';

@Component({
selector: 'app-user-profile',
Expand Down Expand Up @@ -117,14 +116,10 @@ export class UserProfileComponent extends FormBaseComponent implements OnInit {
let user = await this.userService.getUser(this.userName).toPromise();
if (user != null) {
this.canChangePassword = user.detail.canChangePassword;
if(!environment.appSetting.hideIDP){
this.identityProviderDisplayName =
this.identityProviderDisplayName =
user.detail.identityProviders
?.map((idp) => idp.identityProviderDisplayName)
.join(',') || '';
}else {
this.identityProviderDisplayName = 'User ID and password'
}
this.userGroups = user.detail.userGroups || [];
this.userGroups = this.userGroups.filter(
(group, index, self) =>
Expand Down
14 changes: 5 additions & 9 deletions src/app/services/wrapper/wrapper-configuration.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,12 @@ export class WrapperConfigurationService {
const url = `${this.url}/identity-providers`;
return this.http.get<IdentityProvider[]>(url, this.options).pipe(
map((data: IdentityProvider[]) => {
if(environment.appSetting.hideIDP){
data.map((f: IdentityProvider) => {
if (f.name === 'User ID and password') {
tempData.push(f)
}
})
return tempData;
} else {
return data
}
if (f.name === 'User ID and password') {
tempData.push(f)
}
})
return tempData;
}), catchError(error => {
return throwError(error);
})
Expand Down
4 changes: 1 addition & 3 deletions src/environments/environment.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,5 @@ export const environment = {
__cf_bm : 30
},
},
appSetting: {
hideIDP:true,
},
};

0 comments on commit 98332bc

Please sign in to comment.