info-library 2.10.20 → 2.10.21
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/info-library.umd.js +18 -7
- package/bundles/info-library.umd.js.map +1 -1
- package/bundles/info-library.umd.min.js +1 -1
- package/bundles/info-library.umd.min.js.map +1 -1
- package/esm2015/service/authentication.service.js +17 -8
- package/fesm2015/info-library.js +16 -7
- package/fesm2015/info-library.js.map +1 -1
- package/info-library.metadata.json +1 -1
- package/package.json +1 -1
|
@@ -1471,19 +1471,21 @@
|
|
|
1471
1471
|
this.logout();
|
|
1472
1472
|
return true;
|
|
1473
1473
|
}
|
|
1474
|
+
/** @type {?} */
|
|
1475
|
+
var url = activatedRouteSnapshot.data['URL'] || routerStateSnapshot.url;
|
|
1474
1476
|
this.refreshSessionTime();
|
|
1475
|
-
this.definePaginaAtiva(
|
|
1476
|
-
return this.getPermission(
|
|
1477
|
+
this.definePaginaAtiva(url);
|
|
1478
|
+
return this.getPermission(url, true)
|
|
1477
1479
|
.pipe(operators.map(( /**
|
|
1478
1480
|
* @return {?}
|
|
1479
1481
|
*/function () {
|
|
1480
|
-
if (
|
|
1482
|
+
if (url == '/')
|
|
1481
1483
|
return true;
|
|
1482
|
-
if (!_this.hasPermission(
|
|
1484
|
+
if (!_this.hasPermission(url))
|
|
1483
1485
|
_this._router.navigateByUrl('permission');
|
|
1484
|
-
if (
|
|
1486
|
+
if (url.indexOf('novo') > -1 && !_this.hasPermission(url, 'new'))
|
|
1485
1487
|
_this._router.navigateByUrl('permission');
|
|
1486
|
-
if (
|
|
1488
|
+
if (url.indexOf('visualizar') < -1 && activatedRouteSnapshot.paramMap.get('id') != null && !_this.hasPermission(url, 'edit'))
|
|
1487
1489
|
_this._router.navigateByUrl('permission');
|
|
1488
1490
|
return true;
|
|
1489
1491
|
}), operators.catchError(( /**
|
|
@@ -1815,6 +1817,8 @@
|
|
|
1815
1817
|
* @param {?} ret
|
|
1816
1818
|
* @return {?}
|
|
1817
1819
|
*/ ret) {
|
|
1820
|
+
/** @type {?} */
|
|
1821
|
+
var permissao = true;
|
|
1818
1822
|
if (ret.success) {
|
|
1819
1823
|
if (ret.data == null) {
|
|
1820
1824
|
_this.logout();
|
|
@@ -1836,9 +1840,16 @@
|
|
|
1836
1840
|
*/ s) { return s.URL == item.URL && s.ChaveFuncionalidade == item.ChaveFuncionalidade; })).length == 0)
|
|
1837
1841
|
_this._sessao.Permissoes.push(item);
|
|
1838
1842
|
}));
|
|
1843
|
+
ret.data.some(( /**
|
|
1844
|
+
* @param {?} s
|
|
1845
|
+
* @return {?}
|
|
1846
|
+
*/function (/**
|
|
1847
|
+
* @param {?} s
|
|
1848
|
+
* @return {?}
|
|
1849
|
+
*/ s) { return s.URL == urlGenerica; }));
|
|
1839
1850
|
localStorage.setItem(_this._keySessao, JSON.stringify(_this._sessao));
|
|
1840
1851
|
}
|
|
1841
|
-
return
|
|
1852
|
+
return permissao;
|
|
1842
1853
|
})), operators.catchError(( /**
|
|
1843
1854
|
* @param {?} error
|
|
1844
1855
|
* @return {?}
|