def get(self): cur_user = users.get_current_user() if not account_facade.is_admin(cur_user): self.redirect(constants.HOME_URL) template = jinja_environment.get_template("admin.html") template_vals = get_standard_template_dict() content = template.render(template_vals) self.response.out.write(content)
def get(self, target_email): cur_user = users.get_current_user() if not account_facade.is_admin(cur_user): self.redirect(constants.HOME_URL) target_user_info = models.UserInfo.get_for_email(target_email) target_user_info.is_reviewer = True target_user_info.put() account_facade.set_flash_message( cur_user.email(), constants.FLASH_MSG_TYPE_CONFIRMATION, constants.FLASH_MSG_USER_MADE_REVIEWER % target_email ) self.redirect("/administer")