16bb6a946c
* FIX: allow groups to access system queries (without having to run the query once first) Bug is: Trying to allow a group to access a system query results in a Discourse::NotFound unless the query is run first. Cause: - System queries don't exist in the database by default - update calls set_query before action - set_query searches the database for the system query with Query.find_by(:id), which will not exist by default. - running system queries first fixes this because Query.find is overridden to include system queries (Queries.default) in its results, avoiding the Discourse::NotFound. Solution: use the overridden Query.find in set_query to include system queries in the search, instead of Query.find_by(:id) * Added test for fixing allowing groups to access system query. * Fixed test formatting. |
||
---|---|---|
.github/workflows | ||
app | ||
assets | ||
config | ||
db/migrate | ||
lib | ||
spec | ||
test/javascripts | ||
.discourse-compatibility | ||
.eslintrc | ||
.gitignore | ||
.prettierrc | ||
.rubocop.yml | ||
.template-lintrc.js | ||
Gemfile | ||
Gemfile.lock | ||
LICENSE | ||
README.md | ||
package.json | ||
plugin.rb | ||
translator.yml | ||
yarn.lock |
README.md
Data Explorer Plugin
This plugin allows admins to run SQL queries against the live Discourse database, including parameterized queries and formatting for several common column types.
For more information, please see: https://meta.discourse.org/t/data-explorer-plugin/32566