#!/usr/bin/python2 import sys, cgi, cgitb, os cgitb.enable() from mm import website form = cgi.FieldStorage() auth_dbh = website.get_dbh('auth') auth_username, auth_password = website.get_auth(auth_dbh, form) print "Content-type: text/html\n" website.print_header('Mirror Manager :: Add Site') website.handle_auth(auth_username, auth_password, form, 'mm-add-site.cgi', title='Mirror Manager :: Add Site', require_auth=1) del auth_password mirror_dbh = website.get_dbh('mirrors') maintainer_force = auth_username role_type = website.have_group(auth_dbh, auth_username, 'mirrors') if role_type == 'administrator': maintainer_force = None elif not role_type: print "You need to apply for membership in the 'mirrors' group." website.print_footer('Mirror Manager :: Add Site') sys.exit(0) print "