Commit Graph

135 Commits

Author SHA1 Message Date
Neil Lalonde
1355c1e3b0 Fix links to uncategorized when SiteSetting.uncategorized_name is set 2013-06-27 16:16:06 -04:00
Neil Lalonde
5d6ad8f39c Show a useful message when a banned user tries to log in 2013-06-27 15:14:42 -04:00
Sam
92562c2090 Merge pull request #1057 from house9/list-controller-1
refactor list_controller
2013-06-25 17:36:56 -07:00
Neil Lalonde
a86b35c873 Remove the access_password site setting 2013-06-25 15:05:25 -04:00
Jesse House
2e12eb2b62 refactor list_controller
- minor refactoring of actions 'category' and 'category_feed'
- fix defect in 'category' where check was for literal
  string 'uncategorized' instead of SiteSetting.uncategorized_name
- major refactoring on defined topic actions
2013-06-25 08:29:00 -07:00
Jesse House
06be760257 adds TopMenuItem model which encapsulates top_menu parsing logic 2013-06-24 10:04:18 -07:00
Neil Lalonde
e263bb3c0a Anons should be able to see post history 2013-06-19 16:43:16 -04:00
Robin Ward
5ef6714d48 New site setting: minimum_topics_similar, allows you to specify a minimum amount
of topics that need to be in the database before it will suggest similar topics as
a user creates a post.
2013-06-19 13:14:24 -04:00
Sam
799b402778 fix horribly broken invite code, could lead to inviting the wrong person to a conversation 2013-06-19 10:31:19 +10:00
Neil Lalonde
eea00afb80 tos and privacy urls redirect based on site settings 2013-06-18 10:52:04 -04:00
Régis Hanol
6ea91b4416 remove useless upload topic direct association 2013-06-17 02:49:33 +02:00
Robin Ward
77b218a142 FIX: Do not suggest similar topics from secure categories you can't see. 2013-06-12 13:45:11 -04:00
Sam
54d8c963d0 fix tests and allow SE onebox to onebox Meta cause I need that for an post I am writing 2013-06-12 12:23:24 +10:00
Chris Hunt
a362d62b42 Do not return mail password in EmailController 2013-06-11 16:00:13 -07:00
Neil Lalonde
82b5f57e40 Make it possible to set a site setting to empty string 2013-06-11 14:31:38 -04:00
Neil Lalonde
811a0df68b Make s3 region site setting a drop down 2013-06-11 14:24:04 -04:00
Neil Lalonde
5ff7e570ac Add support for enum site settings that render as a dropdown; use a dropdown for default_locale 2013-06-11 11:40:14 -04:00
Neil Lalonde
169125e96d Fix a case where a random topic with null slug will be rendered instead of 404 2013-06-07 14:30:26 -04:00
Ian Christian Myers
b61e10f9ad All parameters for #create in PostsController pass through strong_parameters.
We are now explicitly whitelisting all parameters for Post creation. A nice side-effect is that it cleans up the #create action in PostsController. We can now trust that all parameters entering PostCreator are of a safe scalar type.
2013-06-07 01:29:25 -07:00
Chris Hunt
93fc0e74bc Test correct login behavior when pending approval 2013-06-06 18:36:16 -07:00
Chris Hunt
41b0692543 Show 'waiting approval' and don't send email
When 'must approve users' in enabled, we don't want to send an
activation email to users after they sign up. Instead, we will show them
'waiting approval' and not take an action until their account is
approved by an admin.
2013-06-06 18:36:16 -07:00
Chris Hunt
e7b38fb188 Move duplicated request to helper method 2013-06-06 18:36:16 -07:00
Chris Hunt
4a182f8bba Fix spec doc; sends welcome email for active users 2013-06-06 18:36:16 -07:00
Neil Lalonde
a151bfc7ec Store when a topic was first set to auto-close and report that amount of time when it closes. And do some refactoring. 2013-06-06 17:04:21 -04:00
Neil Lalonde
62041da7e0 Handle /t/only-the-slug urls by trying to find the topic by slug (second try) 2013-06-06 14:41:37 -04:00
Ian Christian Myers
0d01c33482 Enabled strong_parameters across all models/controllers.
All models are now using ActiveModel::ForbiddenAttributesProtection, which shifts the responsibility for parameter whitelisting for mass-assignments from the model to the controller. attr_accessible has been disabled and removed as this functionality replaces that.

The require_parameters method in the ApplicationController has been removed in favor of strong_parameters' #require method.

It is important to note that there is still some refactoring required to get all parameters to pass through #require and #permit so that we can guarantee that parameter values are scalar. Currently strong_parameters, in most cases, is only being utilized to require parameters and to whitelist the few places that do mass-assignments.
2013-06-06 00:30:59 -07:00
Sam
2ca734c118 Merge pull request #964 from chrishunt/exclusive-club
Add 'invite only' site setting
2013-06-05 16:38:47 -07:00
Robin Ward
0b97ea6345 Better HTML emails, smarter email digests, new email section in admin with digest preview 2013-06-05 17:47:25 -04:00
Chris Hunt
acf147ef88 Disable OmniAuth account creation if 'invite only' 2013-06-05 11:11:02 -07:00
Chris Hunt
d432798ff8 Silently fail if user tries to sneak in
When 'invite only' is enabled, there's no way for a user to create an
account unless they try and sneak in by POSTing to /users/. We will
silently fail if this happens.
2013-06-05 11:08:21 -07:00
Ian Christian Myers
41528f5d11 Implemented strong_parameters for Upload/UploadsController.
The topic_id param is now required using strong_parameters' #require method. If the parameter is missing ActionController::ParameterMissing will be raised instead of Discourse::InvalidParameters.
2013-06-05 00:55:55 -07:00
Ian Christian Myers
f50b648844 Implemented strong_parameters for PostAction/PostActionsController.
PostActionsController now uses strong_parameters' #require to require certain parameters. ActionController::ParameterMissing is now thrown when a reqired parameter is missing, rather than Discourse::InvalidParameters.
2013-06-05 00:23:51 -07:00
Ian Christian Myers
3b245031a4 Implemented strong_parameters for Invite/InvitesController.
The email parameter is now required using strong parameters and will throw ActionController::ParameterMissing if it is missing. If the email address is incorrect or invalid, Discourse::InvalidParameters will still be thrown.
2013-06-05 00:04:03 -07:00
Ian Christian Myers
130d837952 Implemented strong_parameters for Category/CategoriesController.
Category now requires parameters to be permitted by strong_parameters using #require or #permit for mass-assignment. Missing required parameters now throw a ActionController::ParameterMissing execption instead of the Discourse::InvalidParameters execption.
2013-06-04 23:45:25 -07:00
Chris Hunt
978785720a Redirect to root after login if no path provided
If we do not do this, then people that login from /login will just be
redirected back to the login page. We'd rather have them see the root
path.
2013-06-04 16:10:10 -07:00
Chris Hunt
92a4828f72 Redirect all controllers to login if required
We want to skip the filter for sessions controller so that we can login
and we want to skip the filter for static pages because those should be
visible to visitors.
2013-06-04 16:10:10 -07:00
Neil Lalonde
c4904aacc0 Automatically flag someone as a spammer if their posts get at least X spam flags from N users while their trust level is 'new user'. Staff can clear and set this status from the user record in admin. 2013-06-03 16:37:40 -04:00
Robin Ward
545dbfc07e New Feature: Staff can choose to "Take Action" when flagging to immediately reach hiding
thresholds.
2013-05-31 17:39:32 -04:00
Robin Ward
d23ef1d090 FIX: You could update a topic to have a title that's too short if the TextCleaner
removed extra characters. Additionally, updating the title will not return an error
message to the client app if the operation fails (rather than failing silently.)
2013-05-31 15:24:13 -04:00
Neil Lalonde
e0dae88885 remove specs for redirect_to_show, i'll figure out how to do this properly later 2013-05-31 12:10:07 -04:00
Neil Lalonde
5d444be72b Support incomplete topic urls like /t/just-a-slug; fix error when using route /t/:topic_id/:post_number 2013-05-30 10:39:15 -04:00
Sam
73834370a5 work in progress, live unread and new counts 2013-05-30 16:49:57 +10:00
Sam
46389754d6 Merge pull request #892 from eriko/cas_support
Cas support
2013-05-28 16:13:29 -07:00
Sam
c32399a80b added test condition that fails with latest AM serializer 2013-05-28 10:42:04 +10:00
Robin Ward
e1781240a6 Merge branch 'refactoring' of git://github.com/mattvanhorn/discourse
Conflicts:
	lib/text_sentinel.rb
2013-05-27 10:42:20 -04:00
Sam
661ddbb158 introduce strong_parameters 2013-05-27 11:06:09 +10:00
Sam
d84ae80074 Simplify user action make it more idiomatic 2013-05-27 10:22:37 +10:00
Matt Van Horn
d7817cf314 extract TopicNotifier class from topic 2013-05-24 13:36:33 -07:00
Robin Ward
bd779834e5 Use search context for filtering search results by current category or user 2013-05-24 14:04:26 -04:00
Erik Ordway
1575ce7b10 add cas support with a few tests 2013-05-23 13:40:50 -07:00