summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/js
diff options
context:
space:
mode:
authorMarc Hefter <marchefter@march42.net>2022-05-07 16:27:20 +0200
committerMarc Hefter <marchefter@gmail.com>2023-04-06 08:19:39 +0200
commit404d26aa4a950e246f11ce421c48faef764fce31 (patch)
tree8535e3de7f5b23e28478fdab652058cc93920eb4 /apps/user_ldap/js
parente63a6f5cdbaf3d9034470d4ef096fdb344fddf8f (diff)
downloadnextcloud-server-404d26aa4a950e246f11ce421c48faef764fce31.tar.gz
nextcloud-server-404d26aa4a950e246f11ce421c48faef764fce31.zip
feature addition: [user_ldap] update user profile from LDAP; WIP work-in-progress; TODO update profile
Signed-off-by: Marc Hefter <marchefter@march42.net>
Diffstat (limited to 'apps/user_ldap/js')
-rw-r--r--apps/user_ldap/js/wizard/wizardTabAdvanced.js93
1 files changed, 93 insertions, 0 deletions
diff --git a/apps/user_ldap/js/wizard/wizardTabAdvanced.js b/apps/user_ldap/js/wizard/wizardTabAdvanced.js
index be98072dcb3..26bcd15810e 100644
--- a/apps/user_ldap/js/wizard/wizardTabAdvanced.js
+++ b/apps/user_ldap/js/wizard/wizardTabAdvanced.js
@@ -125,6 +125,36 @@ OCA = OCA || {};
$element: $('#ldap_ext_storage_home_attribute'),
setMethod: 'setExternalStorageHomeAttribute'
},
+
+ //User Profile Attributes
+ ldap_attr_phone: {
+ $element: $('#ldap_attr_phone'),
+ setMethod: 'setPhoneAttribute'
+ },
+ ldap_attr_website: {
+ $element: $('#ldap_attr_website'),
+ setMethod: 'setWebsiteAttribute'
+ },
+ ldap_attr_address: {
+ $element: $('#ldap_attr_address'),
+ setMethod: 'setAddressAttribute'
+ },
+ ldap_attr_organisation: {
+ $element: $('#ldap_attr_organisation'),
+ setMethod: 'setOrganisationAttribute'
+ },
+ ldap_attr_role: {
+ $element: $('#ldap_attr_role'),
+ setMethod: 'setRoleAttribute'
+ },
+ ldap_attr_headline: {
+ $element: $('#ldap_attr_headline'),
+ setMethod: 'setHeadlineAttribute'
+ },
+ ldap_attr_biography: {
+ $element: $('#ldap_attr_biography'),
+ setMethod: 'setBiographyAttribute'
+ },
};
this.setManagedItems(items);
},
@@ -367,6 +397,69 @@ OCA = OCA || {};
},
/**
+ * sets the attribute for the Nextcloud user profile phone Number
+ *
+ * @param {string} attribute
+ */
+ setPhoneAttribute: function(attribute) {
+ this.setElementValue(this.managedItems.ldap_attr_phone.$element, attribute);
+ },
+
+ /**
+ * sets the attribute for the Nextcloud user profile website
+ *
+ * @param {string} attribute
+ */
+ setWebsiteAttribute: function(attribute) {
+ this.setElementValue(this.managedItems.ldap_attr_website.$element, attribute);
+ },
+
+ /**
+ * sets the attribute for the Nextcloud user profile postal address
+ *
+ * @param {string} attribute
+ */
+ setAddressAttribute: function(attribute) {
+ this.setElementValue(this.managedItems.ldap_attr_address.$element, attribute);
+ },
+
+ /**
+ * sets the attribute for the Nextcloud user profile organisation
+ *
+ * @param {string} attribute
+ */
+ setOrganisationAttribute: function(attribute) {
+ this.setElementValue(this.managedItems.ldap_attr_organisation.$element, attribute);
+ },
+
+ /**
+ * sets the attribute for the Nextcloud user profile role
+ *
+ * @param {string} attribute
+ */
+ setRoleAttribute: function(attribute) {
+ this.setElementValue(this.managedItems.ldap_attr_role.$element, attribute);
+ },
+
+ /**
+ * sets the attribute for the Nextcloud user profile headline
+ *
+ * @param {string} attribute
+ */
+ setHeadlineAttribute: function(attribute) {
+ this.setElementValue(this.managedItems.ldap_attr_headline.$element, attribute);
+ },
+
+ /**
+ * sets the attribute for the Nextcloud user profile biography
+ *
+ * @param {string} attribute
+ */
+ setBiographyAttribute: function(attribute) {
+ this.setElementValue(this.managedItems.ldap_attr_biography.$element, attribute);
+ },
+
+ /**
* deals with the result of the Test Connection test
*
* @param {WizardTabAdvanced} view