summaryrefslogtreecommitdiffstats
path: root/bugzilla_give_permissions.sh
diff options
context:
space:
mode:
authortoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
committertoma <toma@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2009-11-25 17:56:58 +0000
commit6d80ae38e4bfa82323398ceba27f25f94072bf5f (patch)
tree8ff7b57768c1e395e55e3c177687fb76d9d74ea3 /bugzilla_give_permissions.sh
downloadother-6d80ae38e4bfa82323398ceba27f25f94072bf5f.tar.gz
other-6d80ae38e4bfa82323398ceba27f25f94072bf5f.zip
Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features.
BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kde-common@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'bugzilla_give_permissions.sh')
-rwxr-xr-xbugzilla_give_permissions.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/bugzilla_give_permissions.sh b/bugzilla_give_permissions.sh
new file mode 100755
index 0000000..fc9bdb0
--- /dev/null
+++ b/bugzilla_give_permissions.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# This script gives developer permissions (canconfirm+editbugs) to an *existing* bugzilla account
+#
+# Requirements: you must have editusers permissions in bugzilla
+# and you must have the bugzilla cookie available (i.e. already logged in)
+#
+# Author: David Faure <faure@kde.org>
+# License: Public domain
+#
+if [ $# -ne 1 ]; then
+ echo "Usage: $0 email"
+ exit 1
+fi
+email=$1
+
+email_in_query=`echo $email | sed -e 's/@/%40/g'`
+url="http://bugs.kde.org/editusers.cgi?action=edit&user=$email_in_query"
+appid=`dcopstart konqueror "$url"`
+# dcopstart ensures konqueror is launched and ready, but not that khtml finished loading
+objid=''
+while test -z "$objid"; do
+ # TODO: timeout?
+ sleep 1
+ objid=`dcopfind $appid html-widget'*'`
+ objid=`dcopobject $objid`
+ if test "`dcop $appid $objid url`" != "$url"; then
+ objid=''
+ fi
+done
+
+dcop $appid $objid evalJS 'var f=document.forms[0];f.group_7.checked=true;f.group_6.checked=true;f.submit()'
+