Skip to content

Commit

Permalink
Merge pull request #37 from deoren/i36-fix-invalid-table-join
Browse files Browse the repository at this point in the history
Update table join, SQL user privileges query
  • Loading branch information
deoren authored Apr 4, 2019
2 parents f817bbf + ae4e245 commit 1817b11
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion automated_tickets.ini
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ default_to_address = automated-tickets@localhost
# Pull wiki page contents from Redmine database
# The wiki_pages.title value is the name of the page as shown in the URL
# The project.identifier value is the project "shortname", shown in the URL
wiki_page_contents = SELECT wiki_contents.text FROM wiki_contents INNER JOIN wiki_pages ON wiki_pages.id = wiki_contents.id INNER JOIN wikis ON wikis.id = wiki_pages.wiki_id INNER JOIN projects ON projects.id = wikis.project_id WHERE wiki_pages.title = '{}' AND projects.identifier = '{}'
wiki_page_contents = SELECT wiki_contents.text FROM wiki_contents INNER JOIN wiki_pages ON wiki_pages.id = wiki_contents.page_id INNER JOIN wikis ON wikis.id = wiki_pages.wiki_id INNER JOIN projects ON projects.id = wikis.project_id WHERE wiki_pages.title = '{}' AND projects.identifier = '{}'

# The query needed to pull event table entries. As is, this query does not limit
# the returned results by event schedule or whether the flag is set for
Expand Down
2 changes: 1 addition & 1 deletion sql/create_users.sql
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ GRANT SELECT,LOCK TABLES ON event_reminders.* TO 'events_ro'@'localhost';
-- the Redmine database. See the query in the automated_tickets.ini config
-- file for how these columns are used.
GRANT SELECT(text) ON redmine.wiki_contents TO 'events_ro'@'localhost';
GRANT SELECT(id) ON redmine.wiki_contents TO 'events_ro'@'localhost';
GRANT SELECT(page_id) ON redmine.wiki_contents TO 'events_ro'@'localhost';

GRANT SELECT(id) ON redmine.wiki_pages TO 'events_ro'@'localhost';
GRANT SELECT(wiki_id) ON redmine.wiki_pages TO 'events_ro'@'localhost';
Expand Down

0 comments on commit 1817b11

Please sign in to comment.