messages.append("""The password for robot %s has been successfully updated."""%escape(robot_name))
else:
messages.append("""The password for robot %s has been erased, and hence the robot %s does not exist anymore."""%(escape(robot_name),escape(robot_name)))
action=''
confirm=0
robot_name=''
new_pwd1=''
new_pwd2=''
else:
ifnotnew_pwd1:
warnings.append("""By setting an empty password you will actually erase the robot %s"""%escape(robot_name))
errors.append("""You don't have proper authorization to create a URL for robot %s for login_method %s."""%(escape(robot_name),escape(login_method)))
iflogin_methodnotinavailable_robot_login_methods:
errors.append("""The login method must be one among the available_robot_login_methods (%s)."""%escape(', '.join(available_robot_login_methods)))
ifrobot_namenotinrobot_keys.get(login_method,{}):
errors.append("""The robot name does not correspond to a valid robot name (for %s these are: %s)."""%(escape(login_method),escape(', '.join(robot_keys.get(login_method,{}).keys()))))
ifjson_assertion.strip():
try:
assertion=json.loads(json_assertion)
assert(isinstance(assertion,dict))
exceptException,err:
errors.append("""The assertion is not a valid json serializable mapping: %s"""%(err))
output+="<br /><b>Changing the settings:</b><br />"
output+="Currently, all changes must be done using your favourite editor, and the webserver restarted for changes to take effect. For the settings to change, either look in the guide or in access_control_config.py ."