discourse/app/controllers
riking 1833b43ae2 FEATURE: Badge query validation, preview results, and EXPLAIN
Upon saving a badge or requesting a badge result preview,
BadgeGranter.contract_checks! will examine the provided badge SQL for
some contractual obligations - namely, the returned columns and use of
trigger parameters.

Saving the badge is wrapped in a transaction to make this easier, by
raising ActiveRecord::Rollback on a detected violation.

On the client, a modal view is added for the badge query sample run
results, named admin-badge-preview.
The preview action is moved up to the route.
The save action, on failure, triggers a 'saveError' action (also in the
route).

The preview action gains a new parameter, 'explain', which will give the
output of an EXPLAIN query for the badge sql, which can be used by forum
admins to estimate the cost of their badge queries.
The preview link is replaced by two links, one which omits (false) and
includes (true) the EXPLAIN query.

The Badge.save() method is amended to propogate errors.

Badge::Trigger gets some utility methods for use in the
BadgeGranter.contract_checks! method.

Additionally, extra checks outside of BadgeGranter.contract_checks! are
added in the preview() method, to cover cases of null granted_at
columns.

An uninitialized variable path is removed in the backfill() method.

TODO - it would be nice to be able to get the actual names of all
columns the provided query returns, so we could give more errors
2014-08-31 11:25:44 -07:00
..
admin FEATURE: Badge query validation, preview results, and EXPLAIN 2014-08-31 11:25:44 -07:00
users Add Google Oauth2 authenticator. The current Google OpenID authentication has been deprecated by Google and will NOT work for any new websites. 2014-05-21 18:35:10 -04:00
about_controller.rb First stab at About page 2014-08-11 16:59:15 -04:00
application_controller.rb FIX: Resend activation email was busted 2014-08-28 12:07:13 -04:00
badges_controller.rb FEATURE: badge grouping UI 2014-07-18 15:46:36 +10:00
categories_controller.rb BUGFIX: incorrect ordering in category permissions 2014-07-10 12:02:16 +10:00
clicks_controller.rb FIX: Look up a url without the query string if it couldn't be found with it. 2013-12-13 12:56:20 -05:00
composer_messages_controller.rb New User Education goes through a server side ComposerMessages check. Composer message for users 2013-09-13 12:23:53 -04:00
draft_controller.rb drafts were saving but client was failing to parse 2013-09-11 16:18:46 +10:00
email_controller.rb Improve the unsubscribe to digest experience. Give a link in case it 2014-07-15 17:20:59 -04:00
embed_controller.rb PERF: finalize porting to new incoming links structure 2014-08-04 16:43:57 +10:00
exceptions_controller.rb Support 404 routes in the Ember App 2014-04-29 15:29:13 -04:00
forums_controller.rb Avoid using to_s when performing String Interpolation 2014-08-14 23:55:27 +05:30
groups_controller.rb Perform the where(...).first to find_by(...) refactoring. 2014-05-06 14:41:59 +01:00
invites_controller.rb convert space to plus for invite email parameter 2014-08-06 14:02:00 +05:30
list_controller.rb FIX: Centralize Top rendering, remove old code paths. Fix some bugs. 2014-08-28 14:34:31 -04:00
notifications_controller.rb Allow reading notifications without marking them as read. 2014-06-17 23:34:04 +05:30
onebox_controller.rb Fixes regression with video embeds 2013-03-21 20:53:12 -04:00
permalinks_controller.rb FEATURE: add a way to map arbitrary urls to a topic, post, or category. Useful for sites that have migrated to Discourse and want to redirect from their old site to Discourse with 301 redirects. 2014-08-28 15:58:24 -04:00
post_actions_controller.rb FIX: unhide post when a moderator undos the flag on which s/he took action 2014-08-19 16:14:17 +02:00
posts_controller.rb FIX: broken and uneeded code 2014-08-08 09:07:51 +10:00
robots_txt_controller.rb Remove the access_password site setting 2013-06-25 15:05:25 -04:00
search_controller.rb FIX: Re-enable searching for topic by id when using the split topic 2014-08-28 15:42:29 -04:00
session_controller.rb FIX: rate limit password reset email 2014-08-18 10:55:30 +10:00
site_controller.rb FEATURE: Can select topics and hit Dismiss Read on the /unread filter 2014-02-21 15:18:45 -05:00
static_controller.rb SECURITY: Only redirect to our host by path on the login action 2014-08-28 17:45:13 -04:00
topics_controller.rb FIX: do not redirect topic for JSON request 2014-08-29 23:09:02 +05:30
uploads_controller.rb PERF: finalize porting to new incoming links structure 2014-08-04 16:43:57 +10:00
user_actions_controller.rb SECURITY: User action route was returning too much data 2014-08-29 13:46:50 -04:00
user_avatars_controller.rb FIX: redirect old avatars to proper user_avatar route 2014-08-18 17:45:07 +02:00
user_badges_controller.rb Sort the badges on the user profile page 2014-08-25 12:40:51 -07:00
users_controller.rb FIX: Resend activation email was busted 2014-08-28 12:07:13 -04:00