Remember last-visited Attract project in session
This allows us to keep rendering the "Shots" and "Assets" links in the sidebar, even when someone navigates away from the project scope.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import functools
|
||||
import logging
|
||||
|
||||
from flask import Blueprint, render_template, redirect, url_for, request, jsonify
|
||||
from flask import Blueprint, render_template, redirect, url_for, request, jsonify, session
|
||||
import flask_login
|
||||
import werkzeug.exceptions as wz_exceptions
|
||||
|
||||
@@ -131,6 +131,8 @@ def attract_project_view(extra_project_projections: dict=None, extension_props=F
|
||||
if not is_attract:
|
||||
return error_project_not_setup_for_attract()
|
||||
|
||||
session['attract_last_project'] = project.to_dict()
|
||||
|
||||
# Check user access.
|
||||
auth = current_attract.auth
|
||||
auth.determine_user_rights(str2id(project['_id']))
|
||||
|
Reference in New Issue
Block a user