oauth2 fixes
This commit is contained in:
parent
ba541c4e08
commit
eabaa1db19
@ -4,7 +4,7 @@
|
|||||||
"lib": {
|
"lib": {
|
||||||
"entryFile": "src/public-api.ts"
|
"entryFile": "src/public-api.ts"
|
||||||
},
|
},
|
||||||
"whitelistedNonPeerDependencies": [
|
"allowedNonPeerDependencies": [
|
||||||
"."
|
"."
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -1,7 +1,7 @@
|
|||||||
<div class="card border-0">
|
<div class="card border-0">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<fm-back-button></fm-back-button>
|
<fm-back-button></fm-back-button>
|
||||||
<h3><i class="fm fm-farm"></i> <span i18n>Farms</span></h3>
|
<h3><i class="far fa-farm"></i> <span i18n>Farms</span></h3>
|
||||||
<div *ngIf="features;let features">
|
<div *ngIf="features;let features">
|
||||||
<div class="farms">
|
<div class="farms">
|
||||||
<div class="row m-0 pl-3 pr-3" *ngFor="let feature of features"[ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
<div class="row m-0 pl-3 pr-3" *ngFor="let feature of features"[ngClass]="{'selected':isFeatureSelected(feature)}" (click)="handleFeatureClick(feature)" (mouseenter)="handleFeatureMouseEnter(feature)" (mouseleave)="handleFeatureMouseLeave(feature)">
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
"my-data": "my-data"
|
"my-data": "my-data"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"whitelistedNonPeerDependencies": [
|
"allowedNonPeerDependencies": [
|
||||||
"."
|
"."
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -16,7 +16,7 @@
|
|||||||
"bootstrap": "^4.4.1",
|
"bootstrap": "^4.4.1",
|
||||||
"@microsoft/signalr": "^3.1.3",
|
"@microsoft/signalr": "^3.1.3",
|
||||||
"ngx-uploadx": "^3.3.4",
|
"ngx-uploadx": "^3.3.4",
|
||||||
"angular-oauth2-oidc": "^10.0.3",
|
"angular-oauth2-oidc": "^12.0",
|
||||||
"moment": "^2.27.0",
|
"moment": "^2.27.0",
|
||||||
"ngx-avatar": "^4.0.0",
|
"ngx-avatar": "^4.0.0",
|
||||||
"ngx-image-cropper": "^3.3.5",
|
"ngx-image-cropper": "^3.3.5",
|
||||||
|
@ -40,6 +40,7 @@ export class AvatarComponent implements OnInit {
|
|||||||
|
|
||||||
refresh(user: IUser) {
|
refresh(user: IUser) {
|
||||||
if (!user) return null;
|
if (!user) return null;
|
||||||
|
debugger;
|
||||||
const apiEndpoint = this.appConfig.getConfig("apiEndPoint");
|
const apiEndpoint = this.appConfig.getConfig("apiEndPoint");
|
||||||
this.src = `${apiEndpoint}/api/v1/users/${user.code}/avatar`;
|
this.src = `${apiEndpoint}/api/v1/users/${user.code}/avatar`;
|
||||||
this.name = user.firstName && user.lastName ?
|
this.name = user.firstName && user.lastName ?
|
||||||
|
@ -8,6 +8,7 @@ import { createSelector, createFeatureSelector, ActionReducerMap } from '@ngrx/s
|
|||||||
|
|
||||||
import { MODULE_NAME } from '../module-name';
|
import { MODULE_NAME } from '../module-name';
|
||||||
import { IItem } from '../models/item';
|
import { IItem } from '../models/item';
|
||||||
|
import { userInfo } from 'os';
|
||||||
|
|
||||||
export interface State {
|
export interface State {
|
||||||
openedModalName: string,
|
openedModalName: string,
|
||||||
@ -57,13 +58,13 @@ export function reducer(state = initialState, action: appCommonActions.Actions )
|
|||||||
case appCommonActions.INITUSERSUCCESS: {
|
case appCommonActions.INITUSERSUCCESS: {
|
||||||
let a = action as appCommonActions.InitUserSuccess;
|
let a = action as appCommonActions.InitUserSuccess;
|
||||||
let claims = {}
|
let claims = {}
|
||||||
Object.getOwnPropertyNames(a.userinfo).forEach((k) => {
|
Object.getOwnPropertyNames(a.userinfo.info).forEach((k) => {
|
||||||
claims[k] = a.userinfo[k];
|
claims[k] = a.userinfo[k];
|
||||||
});
|
});
|
||||||
var user:IUser = {
|
var user:IUser = {
|
||||||
code:a.user.code,
|
code:a.user.code,
|
||||||
email:a.userinfo["email"],
|
email:a.user?.name?a.user.name : claims["email"],
|
||||||
name:a.userinfo["name"],
|
name:a.user?.email?a.user.email : claims["name"],
|
||||||
claims:claims,
|
claims:claims,
|
||||||
searchable: false
|
searchable: false
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user