You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by ma...@apache.org on 2021/12/10 21:42:59 UTC

[airavata-django-portal] 06/24: AIRAVATA-3468 Disabled username editing by users

This is an automated email from the ASF dual-hosted git repository.

machristie pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit 555b19da0bc2b199fc0dbd847372820531eaad7b
Author: Marcus Christie <ma...@apache.org>
AuthorDate: Wed Jul 7 13:50:28 2021 -0400

    AIRAVATA-3468 Disabled username editing by users
---
 .../django_airavata_auth/js/components/UserProfileEditor.vue      | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/django_airavata/apps/auth/static/django_airavata_auth/js/components/UserProfileEditor.vue b/django_airavata/apps/auth/static/django_airavata_auth/js/components/UserProfileEditor.vue
index b6b31fe..23b9104 100644
--- a/django_airavata/apps/auth/static/django_airavata_auth/js/components/UserProfileEditor.vue
+++ b/django_airavata/apps/auth/static/django_airavata_auth/js/components/UserProfileEditor.vue
@@ -3,12 +3,13 @@
     <b-form-group label="Username">
       <b-form-input
         v-model="$v.user.username.$model"
-        @keydown.native.enter="save"
+        :disabled="true"
         :state="validateState($v.user.username)"
       />
       <b-form-invalid-feedback v-if="!$v.user.username.emailOrMatchesRegex">
         Username can only contain lowercase letters, numbers, underscores and
-        hyphens OR it can be the same as the email address.
+        hyphens OR it can be the same as the email address. Only an
+        administrator can update your username to a valid value.
       </b-form-invalid-feedback>
     </b-form-group>
     <b-form-group label="First Name">
@@ -65,6 +66,9 @@ export default {
       required: true,
     },
   },
+  created() {
+    this.$v.user.$touch();
+  },
   data() {
     return {
       user: this.cloneValue(),