Skip to content
Snippets Groups Projects
Commit ac3991a3 authored by Robert Goldmann's avatar Robert Goldmann
Browse files

client: v1.4.1; pass session token while fetching roadmap if logged in:

otherwise even a loggen in used will not be able to view hidden roadmaps
parent 54ea6ba6
Branches
No related tags found
No related merge requests found
......@@ -5,7 +5,7 @@ from datetime import datetime
import requests
from TheCodeLabs_BaseUtils import DefaultLogger
from TheCodeLabs_FlaskUtils import FlaskBaseApp
from flask import render_template, redirect
from flask import render_template, redirect, session
from logic import Constants
from logic.Localization import LOCALIZATION
......@@ -64,7 +64,11 @@ class RoadmapClient(FlaskBaseApp):
if roadmapID < 1:
return False, render_template('error.html', message=LOCALIZATION['error_param_invalid'])
response = requests.get(urlBuilder.build_url('roadmap', roadmapID, 'full'))
headers = {}
if session:
headers = {'Authorization': 'Bearer {}'.format(session['session_token'])}
response = requests.get(urlBuilder.build_url('roadmap', roadmapID, 'full'), headers=headers)
if response.status_code != 200:
return False, render_template('error.html', message=LOCALIZATION['error_roadmap_not_existing'])
......
{
"version": {
"name": "v1.4.0",
"code": 15,
"name": "v1.4.1",
"code": 16,
"date": "13.11.20"
}
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment