You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tde-common-other/bugzilla_give_permissions.sh

34 lines
976 B

#!/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()'