Commit 4a9a792c authored by Vivek Das Mohapatra's avatar Vivek Das Mohapatra

Invalidate the rails cache for project meta xml in show_project_meta

The project model code path for this invalidates the cache before

Users now have different views of project meta config (references to
inaccessible projects, which were not permitted at all before, are now
elided to "HIDDEN" for users with insufficient access): This means
that the code path which provides the meta config to osc must also
invalidate the cache.

It's not clear that this particular config should be cached at all.
Possibly it should include the user context in the cache key instead
but in any case this is the least invasive way to make sure osc
returns the correct information for now.
parent 7bb95b09
......@@ -432,6 +432,13 @@ class SourceController < ApplicationController
# access check
prj = Project.get_by_name params[:project]
# since users may now see different versions of the
# project XML depending on their access permissions
# to linked projects, and the cache is global, we must
# invalidate the cache before reconstructing the xml.
render xml: prj.to_axml
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment