Commit 6b65399b authored by oussamasic's avatar oussamasic Committed by Ro3034
Browse files

correct authentication redirection issue

parent b61e7000
......@@ -3,7 +3,8 @@ package fr.gouv.vitamui.commons.api.enums;
public enum AttachmentType {
HEADER("HEADER"),
FOOTER("FOOTER"),
PORTAL("PORTAL");
PORTAL("PORTAL"),
USER("USER");
private String value;
AttachmentType(String v) {
......
......@@ -420,6 +420,7 @@ vitamui_platform_informations:
portal_logo: logo_PORTAL.png
header_logo: logo_HEADER.png
footer_logo: logo_FOOTER.png
user_logo: logo_USER.png
theme_colors:
vitamui_primary: "#702382"
vitamui_secondary: "#2563A9"
......@@ -498,7 +499,18 @@ vitamui_password_configurations:
mongo_dump_folder: /backup/mongod/
mongo_backup_reinstall:
- db: "iam"
collections: [ "customers","externalParameters","groups","owners","profiles","sequences","tenants","users","providers" ]
collections:
[
"customers",
"externalParameters",
"groups",
"owners",
"profiles",
"sequences",
"tenants",
"users",
"providers"
]
#- db: "admin"
# collections: []
......
......@@ -102,6 +102,7 @@ ui-archive-search:
portal-logo: "{{ vitamui_platform_informations.theme.portal_logo }}"
header-logo: "{{ vitamui_platform_informations.theme.header_logo }}"
footer-logo: "{{ vitamui_platform_informations.theme.footer_logo }}"
user-logo: "{{ vitamui_platform_informations.theme.user_logo }}"
portal-message: "{{ vitamui_platform_informations.portal_message }}"
portal-title: "{{ vitamui_platform_informations.portal_title }}"
theme-colors:
......
......@@ -96,6 +96,7 @@ ui-identity:
portal-logo: "{{ vitamui_platform_informations.theme.portal_logo }}"
header-logo: "{{ vitamui_platform_informations.theme.header_logo }}"
footer-logo: "{{ vitamui_platform_informations.theme.footer_logo }}"
user-logo: "{{ vitamui_platform_informations.theme.user_logo }}"
portal-message: "{{ vitamui_platform_informations.portal_message }}"
portal-title: "{{ vitamui_platform_informations.portal_title }}"
theme-colors:
......
......@@ -60,6 +60,7 @@ ui-identity:
portal-logo: "{{ vitamui_platform_informations.theme.portal_logo }}"
header-logo: "{{ vitamui_platform_informations.theme.header_logo }}"
footer-logo: "{{ vitamui_platform_informations.theme.footer_logo }}"
user-logo: "{{ vitamui_platform_informations.theme.user_logo }}"
portal-message: "{{ vitamui_platform_informations.portal_message }}"
portal-title: "{{ vitamui_platform_informations.portal_title }}"
theme-colors:
......
......@@ -104,6 +104,7 @@ ui-ingest:
portal-logo: "{{ vitamui_platform_informations.theme.portal_logo }}"
header-logo: "{{ vitamui_platform_informations.theme.header_logo }}"
footer-logo: "{{ vitamui_platform_informations.theme.footer_logo }}"
user-logo: "{{ vitamui_platform_informations.theme.user_logo }}"
portal-message: "{{ vitamui_platform_informations.portal_message }}"
portal-title: "{{ vitamui_platform_informations.portal_title }}"
theme-colors:
......
......@@ -87,6 +87,7 @@ ui-portal:
portal-logo: "{{ vitamui_platform_informations.theme.portal_logo }}"
header-logo: "{{ vitamui_platform_informations.theme.header_logo }}"
footer-logo: "{{ vitamui_platform_informations.theme.footer_logo }}"
user-logo: "{{ vitamui_platform_informations.theme.user_logo }}"
portal-message: "{{ vitamui_platform_informations.portal_message }}"
portal-title: "{{ vitamui_platform_informations.portal_title }}"
theme-colors:
......
......@@ -83,6 +83,7 @@ ui-referential:
portal-logo: "{{ vitamui_platform_informations.theme.portal_logo }}"
header-logo: "{{ vitamui_platform_informations.theme.header_logo }}"
footer-logo: "{{ vitamui_platform_informations.theme.footer_logo }}"
user-logo: "{{ vitamui_platform_informations.theme.user_logo }}"
portal-message: "{{ vitamui_platform_informations.portal_message }}"
portal-title: "{{ vitamui_platform_informations.portal_title }}"
theme-colors:
......
......@@ -36,6 +36,7 @@ ui-archive-search:
portal-logo: logo_PORTAL.png
header-logo: logo_HEADER.png
footer-logo: logo_FOOTER.png
user-logo: logo_USER.png
portal-title: "Portail des applications de l'archivage"
theme-colors:
vitamui-primary: "#702382"
......
......@@ -31,6 +31,13 @@ management:
enabled: false
ui-archive-search:
platform-name: VITAM-UI
portal-logo: logo_PORTAL.png
header-logo: logo_HEADER.png
footer-logo: logo_FOOTER.png
user-logo: logo_USER.png
iam-external-client:
server-host: localhost
server-port: 8083
......
......@@ -82,6 +82,8 @@ public class UIPropertiesImpl implements UIProperties {
private Map<String, String> customer;
private String userLogo;
/**
* Map of application categories (key: category ID, value: category properties)
*/
......
......@@ -73,4 +73,7 @@ public interface UIProperties {
public Map<String, Map<String,Object>> getPortalCategories();
public String getVersionRelease();
public String getUserLogo();
}
......@@ -258,6 +258,9 @@ public class ApplicationService extends AbstractCrudService<ApplicationDto> {
case PORTAL:
file = getBase64File(properties.getPortalLogo(), properties.getAssets());
break;
case USER:
file = getBase64File(properties.getUserLogo(), properties.getAssets());
break;
}
files.put(asset.value(), file);
});
......
......@@ -34,6 +34,7 @@
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
import { Component, OnDestroy, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Subscription } from 'rxjs';
......@@ -50,8 +51,6 @@ import { AccountService } from './account.service';
styleUrls: ['./account.component.scss'],
})
export class AccountComponent extends AppRootComponent implements OnInit, OnDestroy {
// TO HIDE TEMPORARILY THE APPLICATION TAB AND ASK FOR AN EDIT AND CONTACT THE ADMIN BUTTONS
public displayAppTab = false;
public displayEditionAndAdminContact = false;
public account: Account;
......@@ -73,10 +72,7 @@ export class AccountComponent extends AppRootComponent implements OnInit, OnDest
this.account = accountWithUserInfos;
});
});
this.dataBreadcrumb = [
{ identifier: ApplicationId.PORTAL_APP},
{ identifier: ApplicationId.ACCOUNTS_APP}
];
this.dataBreadcrumb = [{ identifier: ApplicationId.PORTAL_APP }, { identifier: ApplicationId.ACCOUNTS_APP }];
}
ngOnDestroy() {
......
<div class="d-flex">
<div *ngIf="photo then userPhoto else defaultUserPhoto" (click)="photoClicked.emit()"></div>
<span *ngIf="hasStatus" [ngClass]="statusCondition ? 'status-badge-green' :'status-badge-grey'"></span>
<span *ngIf="hasStatus" [ngClass]="statusCondition ? 'status-badge-green' : 'status-badge-grey'"></span>
</div>
<ng-template #defaultUserPhoto>
<img class="user-photo" src="../../../../../assets/user_icon.png" [style.width.px]="size" alt="user photo">
<img class="user-photo" [src]="userDefaultLogoUrl" [style.width.px]="size" alt="user photo" />
</ng-template>
<ng-template #userPhoto>
<img class="user-photo" [src]="photo" [style.width.px]="size" alt="user photo">
</ng-template>
\ No newline at end of file
<img class="user-photo" [src]="photo" [style.width.px]="size" alt="user photo" />
</ng-template>
/*
* Copyright French Prime minister Office/SGMAP/DINSIC/Vitam Program (2019-2020)
* and the signatories of the "VITAM - Accord du Contributeur" agreement.
*
* contact@programmevitam.fr
*
* This software is a computer program whose purpose is to implement
* implement a digital archiving front-office system for the secure and
* efficient high volumetry VITAM solution.
*
* This software is governed by the CeCILL-C license under French law and
* abiding by the rules of distribution of free software. You can use,
* modify and/ or redistribute the software under the terms of the CeCILL-C
* license as circulated by CEA, CNRS and INRIA at the following URL
* "http://www.cecill.info".
*
* As a counterpart to the access to the source code and rights to copy,
* modify and redistribute granted by the license, users are provided only
* with a limited warranty and the software's author, the holder of the
* economic rights, and the successive licensors have only limited
* liability.
*
* In this respect, the user's attention is drawn to the risks associated
* with loading, using, modifying and/or developing or reproducing the
* software by the user in light of its specific status of free software,
* that may mean that it is complicated to manipulate, and that also
* therefore means that it is reserved for developers and experienced
* professionals having in-depth computer knowledge. Users are therefore
* encouraged to load and test the software's suitability as regards their
* requirements in conditions enabling the security of their systems and/or
* data to be ensured and, more generally, to use and operate it in the
* same conditions as regards security.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { User } from '../../../models/user/user.interface';
import { SafeResourceUrl } from '@angular/platform-browser';
import { AuthService } from '../../../auth.service';
import { ThemeDataType } from '../../../models';
import { ThemeService } from '../../../theme.service';
@Component({
selector: 'vitamui-common-user-photo',
templateUrl: './user-photo.component.html',
styleUrls: ['./user-photo.component.scss']
styleUrls: ['./user-photo.component.scss'],
})
export class UserPhotoComponent implements OnInit {
@Input() photo: string;
@Input() size = 40;
@Input() hasStatus = false;
@Input() statusCondition = false;
@Output() photoClicked = new EventEmitter<any>();
public userDefaultLogoUrl: SafeResourceUrl;
constructor() { }
ngOnInit() {}
constructor(private themeService: ThemeService, private authService: AuthService) {}
ngOnInit() {
this.userDefaultLogoUrl = this.themeService.getData(this.authService.user, ThemeDataType.USER_LOGO);
}
}
......@@ -34,21 +34,22 @@
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
export interface AppConfiguration {
PORTAL_URL: string;
CAS_URL: string;
CAS_LOGOUT_URL: string;
LOGOUT_REDIRECT_UI_URL: string;
SEARCH_URL?: string;
THEME_COLORS: any;
PORTAL_MESSAGE: string;
PORTAL_TITLE: string;
PORTAL_LOGO: string;
HEADER_LOGO: string;
FOOTER_LOGO: string;
LOGO: string;
[key: string]: string;
PLATFORM_NAME: string;
CUSTOMER: string;
export interface AppConfiguration {
PORTAL_URL: string;
CAS_URL: string;
CAS_LOGOUT_URL: string;
LOGOUT_REDIRECT_UI_URL: string;
SEARCH_URL?: string;
THEME_COLORS: any;
PORTAL_MESSAGE: string;
PORTAL_TITLE: string;
PORTAL_LOGO: string;
HEADER_LOGO: string;
FOOTER_LOGO: string;
USER_LOGO: string;
LOGO: string;
[key: string]: string;
PLATFORM_NAME: string;
CUSTOMER: string;
}
......@@ -34,12 +34,12 @@
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
export interface GraphicIdentity {
hasCustomGraphicIdentity: boolean;
headerDataBase64: string;
footerDataBase64: string;
portalDataBase64: string;
themeColors: {[colorId: string]: string};
export interface GraphicIdentity {
hasCustomGraphicIdentity: boolean;
headerDataBase64: string;
footerDataBase64: string;
portalDataBase64: string;
userDataBase64: string;
themeColors: { [colorId: string]: string };
}
Supports Markdown
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