@fluxhub/fluxhub-lib 1.0.282 → 1.0.286
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/fluxhub-fluxhub-lib.umd.js +5 -14
- package/bundles/fluxhub-fluxhub-lib.umd.js.map +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js +1 -1
- package/bundles/fluxhub-fluxhub-lib.umd.min.js.map +1 -1
- package/esm2015/lib/auth_guard.js +6 -15
- package/esm5/lib/auth_guard.js +6 -15
- package/fesm2015/fluxhub-fluxhub-lib.js +6 -15
- package/fesm2015/fluxhub-fluxhub-lib.js.map +1 -1
- package/fesm5/fluxhub-fluxhub-lib.js +6 -15
- package/fesm5/fluxhub-fluxhub-lib.js.map +1 -1
- package/package.json +5 -5
|
@@ -15253,28 +15253,22 @@
|
|
|
15253
15253
|
function (next, state) {
|
|
15254
15254
|
var _this = this;
|
|
15255
15255
|
this.routingDestination = next.url[0].path;
|
|
15256
|
-
console.log('qui1');
|
|
15257
15256
|
if (this.routingDestination == '')
|
|
15258
15257
|
return true;
|
|
15259
15258
|
if (this.routingDestination == 'login' || this.routingDestination == 'rp' || this.routingDestination == 'pr' || this.routingDestination == '/')
|
|
15260
15259
|
return true;
|
|
15261
|
-
console.log('qui2');
|
|
15262
15260
|
if (this.auth.checkCredentials()) {
|
|
15263
|
-
console.log('qui3');
|
|
15264
15261
|
if (this.routingDestination == 'home')
|
|
15265
15262
|
return true;
|
|
15266
15263
|
//console.log('canActivate 1');
|
|
15267
15264
|
if (this.app_s.user_isadmin != null)
|
|
15268
15265
|
if (this.app_s.user_isadmin == "1")
|
|
15269
15266
|
return true;
|
|
15270
|
-
console.log('qui4');
|
|
15271
15267
|
return new Promise(( /**
|
|
15272
15268
|
* @param {?} resolve
|
|
15273
15269
|
* @return {?}
|
|
15274
15270
|
*/function (resolve) {
|
|
15275
|
-
console.log('qui5');
|
|
15276
15271
|
if (_this.arr_accessi != null) {
|
|
15277
|
-
console.log('qui6');
|
|
15278
15272
|
for (var i = 0; i < _this.arr_accessi.length; i++) {
|
|
15279
15273
|
if (_this.arr_accessi[i].type == 'M')
|
|
15280
15274
|
if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
|
|
@@ -15288,7 +15282,6 @@
|
|
|
15288
15282
|
resolve(false);
|
|
15289
15283
|
return;
|
|
15290
15284
|
}
|
|
15291
|
-
console.log('qui7');
|
|
15292
15285
|
//console.log('canActivate 5');
|
|
15293
15286
|
/** @type {?} */
|
|
15294
15287
|
var p = new QParam();
|
|
@@ -15303,7 +15296,6 @@
|
|
|
15303
15296
|
if (data != null)
|
|
15304
15297
|
if (data.result_msg == "OK")
|
|
15305
15298
|
if (data.result_data.length > 0) {
|
|
15306
|
-
console.log('qui8');
|
|
15307
15299
|
//console.log('canActivate 6');
|
|
15308
15300
|
_this.appService.user_roles = data.result_data[0].roles;
|
|
15309
15301
|
if (_this.appService.user_roles.length > 0)
|
|
@@ -15311,8 +15303,10 @@
|
|
|
15311
15303
|
_this.appService.user_isadmin = data.result_data[0].isadmin;
|
|
15312
15304
|
_this.appService.user = data.result_data[0].username;
|
|
15313
15305
|
if (_this.app_s.user_isadmin != null)
|
|
15314
|
-
if (_this.app_s.user_isadmin == "1")
|
|
15315
|
-
|
|
15306
|
+
if (_this.app_s.user_isadmin == "1") {
|
|
15307
|
+
resolve(true);
|
|
15308
|
+
return;
|
|
15309
|
+
}
|
|
15316
15310
|
/** @type {?} */
|
|
15317
15311
|
var p_1 = new QParam();
|
|
15318
15312
|
p_1.sql = "SELECT_APPS_USER_ALL";
|
|
@@ -15324,7 +15318,6 @@
|
|
|
15324
15318
|
* @param {?} data
|
|
15325
15319
|
* @return {?}
|
|
15326
15320
|
*/function (data) {
|
|
15327
|
-
console.log('qui9');
|
|
15328
15321
|
_this.arr_accessi = data.result_data;
|
|
15329
15322
|
for (var i = 0; i < _this.arr_accessi.length; i++) {
|
|
15330
15323
|
//console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
|
|
@@ -15345,6 +15338,7 @@
|
|
|
15345
15338
|
else {
|
|
15346
15339
|
_this.toast.error("ACCESS DENIED [0X0002]");
|
|
15347
15340
|
_this.slimLoadingBarService.complete();
|
|
15341
|
+
resolve(false);
|
|
15348
15342
|
return false;
|
|
15349
15343
|
}
|
|
15350
15344
|
}));
|
|
@@ -15352,7 +15346,6 @@
|
|
|
15352
15346
|
else {
|
|
15353
15347
|
/** @type {?} */
|
|
15354
15348
|
var p_2 = new QParam();
|
|
15355
|
-
console.log('qui10');
|
|
15356
15349
|
p_2.sql = "SELECT_APPS_USER_ALL";
|
|
15357
15350
|
_this.appService.getState().app_enabled = new Array();
|
|
15358
15351
|
p_2.types = ['string'];
|
|
@@ -15364,9 +15357,7 @@
|
|
|
15364
15357
|
*/function (data) {
|
|
15365
15358
|
//console.log('canActivate 9');
|
|
15366
15359
|
_this.arr_accessi = data.result_data;
|
|
15367
|
-
console.log('qui11');
|
|
15368
15360
|
for (var i = 0; i < _this.arr_accessi.length; i++) {
|
|
15369
|
-
console.log('qui12');
|
|
15370
15361
|
//console.log('[' + this.arr_accessi[i].url.split('/')[0] + ']', '-----', '[' + this.routingDestination.split('/')[0] + ']');
|
|
15371
15362
|
if (_this.arr_accessi[i].type == 'M') {
|
|
15372
15363
|
if ('[' + _this.arr_accessi[i].url.split('/')[0] + ']' == '[' + _this.routingDestination.split('/')[0] + ']') {
|