Browse Source

Add policy to allow users to update their name/contact info

Kristan Kenney 5 years ago
parent
commit
3f18b8cc42
2 changed files with 4 additions and 3 deletions
  1. 2 1
      bin/v-list-sys-config
  2. 2 2
      web/templates/user/edit_user.html

+ 2 - 1
bin/v-list-sys-config

@@ -76,7 +76,8 @@ json_list() {
         "API": "'$API'",
         "API_ALLOWED_IP": "'$API_ALLOWED_IP'",
         "RESTRICTED_ADMIN": "'$RESTRICTED_ADMIN'",
-        "HIDE_ADMIN_ACCOUNT": "'$HIDE_ADMIN_ACCOUNT'"
+        "HIDE_ADMIN_ACCOUNT": "'$HIDE_ADMIN_ACCOUNT'",
+        "POLICY_USER_EDIT_DETAILS": "'$POLICY_USER_EDIT_DETAILS'"
     }
     }'
 }

+ 2 - 2
web/templates/user/edit_user.html

@@ -74,7 +74,7 @@
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_name" value="<?=htmlentities(trim($v_name, "'"))?>">
+                                    <input type="text" size="20" class="vst-input" name="v_name" value="<?=htmlentities(trim($v_name, "'"))?>" <? if ($_SESSION['POLICY_USER_EDIT_DETAILS'] === 'no') { echo 'disabled'; }?>>
                                 </td>
                             </tr>
                             <tr>
@@ -84,7 +84,7 @@
                             </tr>
                             <tr>
                                 <td>
-                                    <input type="text" size="20" class="vst-input" name="v_email" value="<?=htmlentities(trim($v_email, "'"))?>">
+                                    <input type="text" size="20" class="vst-input" name="v_email" value="<?=htmlentities(trim($v_email, "'"))?>" <? if ($_SESSION['POLICY_USER_EDIT_DETAILS'] === 'no') { echo 'disabled'; }?>>
                                 </td>
                             </tr>
                             <tr>