@sumaris-net/ngx-components 2.4.141 → 2.4.142
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/esm2020/src/app/core/services/account.service.mjs +3 -3
- package/esm2020/src/app/core/services/model/person.model.mjs +5 -1
- package/esm2020/src/environments/environment.mjs +5 -5
- package/fesm2015/sumaris-net.ngx-components.mjs +10 -6
- package/fesm2015/sumaris-net.ngx-components.mjs.map +1 -1
- package/fesm2020/sumaris-net.ngx-components.mjs +10 -6
- package/fesm2020/sumaris-net.ngx-components.mjs.map +1 -1
- package/package.json +1 -1
- package/src/app/core/services/model/person.model.d.ts +1 -0
|
@@ -11920,10 +11920,10 @@ const environment = Object.freeze({
|
|
|
11920
11920
|
helpUrl: 'https://gitlab.ifremer.fr/sih-public/sumaris/sumaris-doc/-/blob/master/user-manual/index_fr.md',
|
|
11921
11921
|
// Development
|
|
11922
11922
|
defaultAuthValues: {
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11923
|
+
// Basic auth (using Person.username)
|
|
11924
|
+
// username: 'admq2', password: 'q22006'
|
|
11925
|
+
// Token auth (using Person.pubkey)
|
|
11926
|
+
username: 'admin@sumaris.net', password: 'admin',
|
|
11927
11927
|
},
|
|
11928
11928
|
account: {
|
|
11929
11929
|
enableListenChanges: true,
|
|
@@ -16425,6 +16425,10 @@ class PersonUtils {
|
|
|
16425
16425
|
static personsToString(data, separator) {
|
|
16426
16426
|
return (data || []).map(PersonUtils.personToString).join(separator || ', ');
|
|
16427
16427
|
}
|
|
16428
|
+
static roleToProfile(role, defaultProfile) {
|
|
16429
|
+
const label = role?.replace(/^ROLE_/, '');
|
|
16430
|
+
return label || defaultProfile;
|
|
16431
|
+
}
|
|
16428
16432
|
}
|
|
16429
16433
|
|
|
16430
16434
|
var Account_1;
|
|
@@ -18044,8 +18048,8 @@ class AccountService extends BaseGraphqlService {
|
|
|
18044
18048
|
// Same recorder department: OK, user can write
|
|
18045
18049
|
if (this._data.department.id === recorderDepartment.id)
|
|
18046
18050
|
return true;
|
|
18047
|
-
//
|
|
18048
|
-
return
|
|
18051
|
+
// Cannot write
|
|
18052
|
+
return false;
|
|
18049
18053
|
}
|
|
18050
18054
|
async register(data) {
|
|
18051
18055
|
if (this.isLogin()) {
|