blob: fc9bdb0aeb6a37ce76edfab33af7eee66bcc71f6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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 <[email protected]>
# 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()'
|