@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.
@@ -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
- // Basic auth (using Person.username)
11924
- // username: 'admq2', password: 'q22006'
11925
- // Token auth (using Person.pubkey)
11926
- //username: 'admin@sumaris.net', password: 'admin',
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
- // Else, check if supervisor (or more)
18048
- return PersonUtils.hasUpperOrEqualsProfile(this._data.profiles, 'SUPERVISOR');
18051
+ // Cannot write
18052
+ return false;
18049
18053
  }
18050
18054
  async register(data) {
18051
18055
  if (this.isLogin()) {