Merge "Check if full name and email edit are allowed in realm" into stable-3.0
diff --git a/.bazelrc b/.bazelrc
index 4ed16cf..3ae03ff 100644
--- a/.bazelrc
+++ b/.bazelrc
@@ -1,2 +1,2 @@
-build --workspace_status_command=./tools/workspace-status.sh
+build --workspace_status_command="python ./tools/workspace_status.py"
 test --build_tests_only
diff --git a/.bazelversion b/.bazelversion
index 3eefcb9..9084fa2 100644
--- a/.bazelversion
+++ b/.bazelversion
@@ -1 +1 @@
-1.0.0
+1.1.0
diff --git a/WORKSPACE b/WORKSPACE
index a4869bb..4295cd8 100644
--- a/WORKSPACE
+++ b/WORKSPACE
@@ -3,7 +3,7 @@
 load("//:bazlets.bzl", "load_bazlets")
 
 load_bazlets(
-    commit = "29ba75f790c68ae2c233a67f7ce1e58e04201ce2",
+    commit = "ca31f016a3130c3eeb032538d2832bf555559b28",
     #local_path = "/home/<user>/projects/bazlets",
 )
 
diff --git a/src/main/resources/static/gr-serviceuser-create.html b/src/main/resources/static/gr-serviceuser-create.html
index de31313..9034ada 100644
--- a/src/main/resources/static/gr-serviceuser-create.html
+++ b/src/main/resources/static/gr-serviceuser-create.html
@@ -68,7 +68,7 @@
         </section>
       </fieldset>
       <gr-button id="createButton"
-                 on-tap="_handleCreateServiceUser"
+                 on-click="_handleCreateServiceUser"
                  disabled="[[!_enableButton]]">
         Create
       </gr-button>
diff --git a/src/main/resources/static/gr-serviceuser-detail.html b/src/main/resources/static/gr-serviceuser-detail.html
index ac48daa..d5ba86e 100644
--- a/src/main/resources/static/gr-serviceuser-detail.html
+++ b/src/main/resources/static/gr-serviceuser-detail.html
@@ -82,7 +82,7 @@
                     [[_active(_serviceUser)]]
                   </span>
                 </section>
-                <gr-button id="statusToggleButton" on-tap="_toggleStatus" disabled="[[_loading]]">
+                <gr-button id="statusToggleButton" on-click="_toggleStatus" disabled="[[_loading]]">
                   [[_statusButtonText]]</gr-button>
               </fieldset>
               <fieldset>
@@ -123,7 +123,7 @@
                 <p id="ownerChangeWarning" class="style-scope gr-settings-view" hidden$="[[!_newOwner]]">
                   [[_ownerChangeWarning]]
                 </p>
-                <gr-button id="savePrefs" on-tap="_handleSavePreferences" disabled="[[!_prefsChanged]]">
+                <gr-button id="savePrefs" on-click="_handleSavePreferences" disabled="[[!_prefsChanged]]">
                   Save changes
                 </gr-button>
               </fieldset>
diff --git a/src/main/resources/static/gr-serviceuser-http-password.html b/src/main/resources/static/gr-serviceuser-http-password.html
index f2f5b3e..8cebbe5 100644
--- a/src/main/resources/static/gr-serviceuser-http-password.html
+++ b/src/main/resources/static/gr-serviceuser-http-password.html
@@ -54,9 +54,9 @@
           <span class="value">[[_serviceUser.username]]</span>
         </section>
         <gr-button id="generateButton"
-                   on-tap="_handleGenerateTap">Generate new password</gr-button>
+                   on-click="_handleGenerateTap">Generate new password</gr-button>
         <gr-button id="deleteButton"
-                   on-tap="_handleDelete">Delete password</gr-button>
+                   on-click="_handleDelete">Delete password</gr-button>
       </div>
     </div>
     <gr-overlay id="generatedPasswordOverlay"
@@ -73,7 +73,7 @@
         </section>
         <gr-button link
                    class="closeButton"
-                   on-tap="_closeOverlay">Close</gr-button>
+                   on-click="_closeOverlay">Close</gr-button>
       </div>
     </gr-overlay>
   </template>
diff --git a/src/main/resources/static/gr-serviceuser-list.html b/src/main/resources/static/gr-serviceuser-list.html
index 052e9f4..e927d63 100644
--- a/src/main/resources/static/gr-serviceuser-list.html
+++ b/src/main/resources/static/gr-serviceuser-list.html
@@ -42,7 +42,7 @@
         <gr-button primary
                    link
                    id="createNew"
-                   on-tap="_createNewServiceUser">
+                   on-click="_createNewServiceUser">
           Create New
         </gr-button>
       </div>
diff --git a/src/main/resources/static/gr-serviceuser-ssh-panel.html b/src/main/resources/static/gr-serviceuser-ssh-panel.html
index b7ed896..2906a10 100644
--- a/src/main/resources/static/gr-serviceuser-ssh-panel.html
+++ b/src/main/resources/static/gr-serviceuser-ssh-panel.html
@@ -74,14 +74,14 @@
                 <td>[[_getStatusLabel(key.valid)]]</td>
                 <td>
                   <gr-button link
-                             on-tap="_showKey"
+                             on-click="_showKey"
                              data-index$="[[index]]"
                              link>Click to View</gr-button>
                 </td>
                 <td>
                   <gr-button link
                              data-index$="[[index]]"
-                             on-tap="_handleDeleteKey">Delete</gr-button>
+                             on-click="_handleDeleteKey">Delete</gr-button>
                 </td>
               </tr>
             </template>
@@ -104,7 +104,7 @@
             </section>
           </fieldset>
           <gr-button class="closeButton"
-                     on-tap="_closeOverlay">Close</gr-button>
+                     on-click="_closeOverlay">Close</gr-button>
         </gr-overlay>
       </fieldset>
       <fieldset>
@@ -121,7 +121,7 @@
         <gr-button id="addButton"
                    link
                    disabled$="[[_computeAddButtonDisabled(_newKey)]]"
-                   on-tap="_handleAddKey">
+                   on-click="_handleAddKey">
           Add new SSH key
         </gr-button>
       </fieldset>
diff --git a/tools/workspace-status.sh b/tools/workspace-status.sh
deleted file mode 100755
index cb96138..0000000
--- a/tools/workspace-status.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-# This script will be run by bazel when the build process starts to
-# generate key-value information that represents the status of the
-# workspace. The output should be like
-#
-# KEY1 VALUE1
-# KEY2 VALUE2
-#
-# If the script exits with non-zero code, it's considered as a failure
-# and the output will be discarded.
-
-function rev() {
-  cd $1; git describe --always --match "v[0-9].*" --dirty
-}
-
-echo STABLE_BUILD_SERVICEUSER_LABEL $(rev .)
diff --git a/tools/workspace_status.py b/tools/workspace_status.py
new file mode 100644
index 0000000..8574d17
--- /dev/null
+++ b/tools/workspace_status.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+
+# This script will be run by bazel when the build process starts to
+# generate key-value information that represents the status of the
+# workspace. The output should be like
+#
+# KEY1 VALUE1
+# KEY2 VALUE2
+#
+# If the script exits with non-zero code, it's considered as a failure
+# and the output will be discarded.
+
+from __future__ import print_function
+import subprocess
+import sys
+
+CMD = ['git', 'describe', '--always', '--match', 'v[0-9].*', '--dirty']
+
+
+def revision():
+    try:
+        return subprocess.check_output(CMD).strip().decode("utf-8")
+    except OSError as err:
+        print('could not invoke git: %s' % err, file=sys.stderr)
+        sys.exit(1)
+    except subprocess.CalledProcessError as err:
+        print('error using git: %s' % err, file=sys.stderr)
+        sys.exit(1)
+
+
+print("STABLE_BUILD_SERVICEUSER_LABEL %s" % revision())