def create_code(): data = parse_request(RoleCodeCreateSchema) challenge_role(data) return jsonify({ 'status': 'ok', 'message': gettext('To proceed, please check your email.') })
def create_code(): """Send a account creation token to an email address. --- post: summary: Begin account registration description: > Begin validating a user email by sending a token to the address which can then be used to create an account. requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleCodeCreate' responses: '200': description: OK content: application/json: schema: type: object properties: status: type: string token: type: string tags: - Role """ require(request.authz.can_register()) data = parse_request("RoleCodeCreate") challenge_role(data) return jsonify({ "status": "ok", "message": gettext("To proceed, please check your email.") })
def create_code(): require(not request.authz.in_maintenance, settings.PASSWORD_LOGIN) data = parse_request(RoleCodeCreateSchema) challenge_role(data) return jsonify({ 'status': 'ok', 'message': gettext('To proceed, please check your email.') })
def create_code(): """Send a account creation token to an email address. --- post: summary: Begin account registration description: > Begin validating a user email by sending a token to the address which can then be used to create an account. requestBody: content: application/json: schema: $ref: '#/components/schemas/RoleCodeCreate' responses: '200': description: OK content: application/json: schema: type: object properties: status: type: string token: type: string tags: - Role """ require(settings.PASSWORD_LOGIN) require(not request.authz.in_maintenance) data = parse_request('RoleCodeCreate') challenge_role(data) return jsonify({ 'status': 'ok', 'message': gettext('To proceed, please check your email.') })