Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8c2d7db + 6ff3b72 commit fcf2489Copy full SHA for fcf2489
1 file changed
ckan/lib/base.py
@@ -20,8 +20,7 @@
20
import ckan.lib.helpers as h
21
import ckan.plugins as p
22
23
-from ckan.common import request, config, session
24
-
+from ckan.common import request, config, session, g
25
26
log = logging.getLogger(__name__)
27
@@ -116,7 +115,7 @@ def _allow_caching(cache_force: Optional[bool] = None):
116
115
if cache_force is not None:
117
allow_cache = cache_force
118
# Do not allow caching of pages for logged in users/flash messages etc.
119
- elif _is_valid_session_cookie_data():
+ elif ('user' in g and g.user) or _is_valid_session_cookie_data():
120
allow_cache = False
121
# Tests etc.
122
elif 'REMOTE_USER' in request.environ:
0 commit comments