Commit 09e4bc24 authored by LAVENIER's avatar LAVENIER
Browse files

Release v0.13.15

[fix] Login auth: allow to override the default login/pwd, when develop
parent a0d4f09d
{
"name": "@sumaris-net/ngx-components",
"description": "SUMARiS Angular components",
"version": "0.13.15",
"version": "0.13.16",
"author": "contact@e-is.pro",
"license": "AGPL-3.0",
"readmeFilename": "README.md",
......
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Inject, Input, OnInit, Optional, Output} from '@angular/core';
import {ChangeDetectionStrategy, ChangeDetectorRef, Component, EventEmitter, Inject, OnInit, Optional, Output} from '@angular/core';
import {FormBuilder, Validators} from '@angular/forms';
import {ModalController} from '@ionic/angular';
import {RegisterModal} from '../../register/modal/modal-register';
......@@ -89,10 +89,10 @@ export class AuthForm extends AppForm<AuthData> implements OnInit {
);
// For DEV only
if (this.environment && this.environment.production === false && this.environment.development) {
if (this.environment && this.environment.production === false && this.environment.defaultAuthValues) {
// Set the default user, for testing.
// Override using environment, if any
this.form.patchValue(this.environment.development);
this.form.patchValue(this.environment.defaultAuthValues);
}
}
......
......@@ -45,7 +45,7 @@ export class Environment {
// Development
// (see values in the test database - XML files in Pod's module)
development: {
defaultAuthValues: {
username?: string;
password?: string;
};
......
import {Environment} from './environment.class';
/* eslint-disable */
export const environment: Environment = Object.freeze({
export const environment = Object.freeze(<Environment>{
name: '@sumaris-net/ngx-components',
version: ndefined, // overridden by ENVIRONMENT token
version: undefined, // overridden by ENVIRONMENT token
production: true,
baseUrl: '/',
defaultLocale: 'fr',
......
......@@ -56,7 +56,7 @@ export const environment = Object.freeze(<Environment>{
reportIssueUrl: (pkg.bugs && pkg.bugs.url as string),
// Development
development: {
defaultAuthValues: {
// Basic auth (using Person.username)
// username: 'admq2', password: 'q22006'
......
......@@ -63,7 +63,7 @@ export const environment: Environment = Object.freeze({
reportIssueUrl: 'https://gitlab.ifremer.fr/sih-public/sumaris/ngx-sumaris-components/-/issues',
// Development
development: {
defaultAuthValues: {
// Basic auth (using Person.username)
// username: 'admq2', password: 'q22006'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment