From 56e8a731000c1bb8fc61bb172a4c0189f3c64216 Mon Sep 17 00:00:00 2001 From: Lisbet Alvarez <107949262+lisbet-alvarez@users.noreply.github.com> Date: Wed, 12 Jul 2023 10:57:14 -0700 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20update=20accounts=20?= =?UTF-8?q?model=20with=20ldap=20account=20attributes=20(#1766)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ✅ Closes: ICU-10050 --- addons/api/addon/generated/models/account.js | 27 +++++++++++++++++--- ui/desktop/electron-app/yarn.lock | 2 +- 2 files changed, 24 insertions(+), 5 deletions(-) diff --git a/addons/api/addon/generated/models/account.js b/addons/api/addon/generated/models/account.js index 998ee35c1..2c34bd65f 100644 --- a/addons/api/addon/generated/models/account.js +++ b/addons/api/addon/generated/models/account.js @@ -49,9 +49,9 @@ export default class GeneratedAccountModel extends BaseModel { }) version; - // =attributes (password) + // =attributes (password and LDAP) @attr('string', { - for: 'password', + for: ['password', 'ldap'], isNestedAttribute: true, description: 'The account login name', }) @@ -60,8 +60,27 @@ export default class GeneratedAccountModel extends BaseModel { // =attributes (OIDC) @attr('string', { for: 'oidc', isNestedAttribute: true }) subject; @attr('string', { for: 'oidc', isNestedAttribute: true }) issuer; - @attr('string', { for: 'oidc', isNestedAttribute: true, readOnly: true }) + + // =attributes (OIDC and LDAP) + @attr('string', { + for: ['oidc', 'ldap'], + isNestedAttribute: true, + readOnly: true, + }) email; - @attr('string', { for: 'oidc', isNestedAttribute: true, readOnly: true }) + @attr('string', { + for: ['oidc', 'ldap'], + isNestedAttribute: true, + readOnly: true, + }) full_name; + + // =attributes (LDAP) + @attr('string', { for: 'ldap', isNestedAttribute: true, readOnly: true }) dn; + @attr('string-array', { + for: 'ldap', + isNestedAttribute: true, + readOnly: true, + }) + member_of_groups; } diff --git a/ui/desktop/electron-app/yarn.lock b/ui/desktop/electron-app/yarn.lock index ccd5fc058..e069ea8ed 100644 --- a/ui/desktop/electron-app/yarn.lock +++ b/ui/desktop/electron-app/yarn.lock @@ -3269,7 +3269,7 @@ tar-stream@^1.5.2: to-buffer "^1.1.1" xtend "^4.0.0" -tar@^6.0.5, tar@^6.1.11, tar@^6.1.2, tar@^6.1.9: +tar@^6.0.5, tar@^6.1.11, tar@^6.1.2: version "6.1.11" resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==