Stephan Kaag
0e3b8fbb24
Remove some calls to `all`. They are not required, and Rails4 raises warnings about them.
2013-07-22 20:44:11 +02:00
Robin Ward
b7327942af
Add `deleted_by` to `Trashable` tables
2013-07-09 15:46:36 -04:00
Stephan Kaag
89b621d31a
Refactor update_all statements in order to prevent deprecation warnings in Rails 4
2013-07-02 18:36:47 +02:00
Sam
5d4760f91d
ruby 1.9.3 compat ... to_h does not exist there
2013-07-01 12:44:46 +10:00
Sam
4512956c68
don't run the wrong sentinel on message, message is validated in the post, in effect some flags were being rejected incorrectly
2013-06-28 12:14:40 +10:00
Sam
6145e99baa
navigate to message fixed, changed to button
...
added spec to catch this regression in future
2013-06-27 16:59:07 +10:00
Sam
039b4758ac
fix 1.9.3 regression, [] does not work on OpenStruct there.
2013-06-26 21:49:29 +10:00
Sam
48d7a33157
Flag UI now displays deleted status for post/topic correctly on old flags
...
Commented out a spec that was failing in order random, with a TODO
2013-06-26 16:18:50 +10:00
Sam
65dc04c00e
simplify flag reporting and correct it so it properly displays old flags
2013-06-26 15:57:55 +10:00
Amos L King
777e8c2012
Correct spelling of suppress
...
supress => suppress
Amos King @adkron <amos.l.king@gmail.com>
2013-06-20 23:44:27 -05:00
Sam
4a8a663a67
flagging workflow changes per http://meta.discourse.org/t/we-need-an-archive-flag-notification-button/7450
2013-06-20 17:42:15 +10:00
Régis Hanol
454636abf1
annotate models
2013-06-17 02:49:34 +02: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
Neil Lalonde
b55182b983
Use PostDestroyer when deleting all of a user's posts; deleting a post removes its flags and resets its flag counts
2013-06-05 16:05:13 -04: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
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
830b93a16b
Reduced complexity of admin flags controller, split up into methods, moved reports into model.
2013-05-29 16:49:34 -04:00
Robin Ward
197909246c
Weigh staff likes higher when calculating scores. New site setting: `staff_like_weight`
...
can set the factor (default is 3)
2013-05-27 12:46:08 -04:00
Sam
ca2dee52db
moved comments to the bottom, they are way less intrusive there
2013-05-24 12:48:32 +10:00
Sam
2cd95bc649
lets try out annotations
2013-05-24 12:35:14 +10:00
Robin Ward
27828c5ec2
Merge pull request #871 from avdi/refactoring-with-josh-and-avdi
...
Various refactorings towards Ruby/Rails idiom from Josh Susser and Avdi Grimm
2013-05-21 07:18:50 -07:00
Josh Susser and Avdi Grimm
5659b66729
Refactor select().map() to use pluck.
...
Remove a method already provided by ActiveRecord.
2013-05-17 15:11:37 -04:00
Robin Ward
d554a59102
Support for a new site setting: `newuser_spam_host_threshold`. If a new user posts a link
...
to the same host enough tiles, they will not be able to post the same link again.
Additionally, the site will flag all their previous posts with links as spam and they will
be instantly hidden via the auto hide workflow.
2013-05-16 12:19:50 -04:00
Sam
9b33e826f2
clear flags on reply to notify moderators
2013-05-13 11:48:01 +10:00
Sam
5280b3a01b
more group progress, UI getting there, controller mostly done
...
changed it so notify moderators goes to the moderators group
allow admins to grant self moderation and revoke self moderation
2013-05-09 17:37:34 +10:00
Sam
e9fc272db7
remove acts_as_paranoid, use .trash! , .recover! and .with_deleted as needed
...
makes upgrading to rails 4 possible
2013-05-07 14:39:01 +10:00
Régis Hanol
392b9696f4
prevent duplicate actions on a post
2013-05-04 02:52:45 +02:00
Sam
5ec52bd2e9
:s/moderator?/staff/g ... our naming was kind of crazy, renamed moderator? to staff
2013-05-02 17:22:27 +10:00
Sam
65cd00cf25
moderators now have teeth, more at http://meta.discourse.org/t/moderator-permission-set/6307/5
...
allow pms to be targetted at groups
2013-05-02 15:15:53 +10:00
Neil Lalonde
20d73a4151
Fix bookmarks admin dashboard counts to include bookmarks that were deleted
2013-04-30 12:52:12 -04:00
Sam
cfc62dadff
speed up tests
...
add the ability to find the first notify private message
2013-04-22 17:45:03 +10:00
Neil Lalonde
5cd6c85e8b
Add bookmarks and favorites to dashboard stats
2013-04-18 14:27:22 -04:00
Neil Lalonde
3b6aeb14c7
Add subtype to topics to classify private messages
2013-04-16 16:56:18 -04:00
Sam
2bdb53261b
don't treat notify user as a flag
2013-04-15 13:09:52 +10:00
Sam
86b317ea73
oops
2013-04-12 18:14:36 +10:00
Sam
e969eb14e8
added 2 new flag types: notify user and notify moderators
...
fixed up messed up user navigation
refactored
2013-04-12 17:55:45 +10:00
Régis Hanol
c5cf8be864
auto replace rules in titles
2013-04-10 11:00:50 +02:00
Neil Lalonde
bb18b6cb9b
Dashboard: split out private messages from topic and post counts; re-enable report_spec because I think I fixed it...
2013-04-03 13:26:09 -04:00
Gosha Arinich
bdfa9b0508
create the User.admins and User.moderators scopes
2013-03-29 09:52:09 +03:00
Robin Ward
5aec5261a7
Converted flag threshold constants to enums
2013-03-18 17:54:43 -04:00
Neil Lalonde
6a99d12784
Add likes to admin dashboard
2013-03-18 10:08:08 -04:00
Robin Ward
1103dde5cd
Fix: When you split topics, featured users and like counts were incorrect.
2013-03-12 12:33:42 -04:00
Régis Hanol
239cbd2d58
enforce coding convention
...
replaced every `and` by `&&` and every `or` by `||`
2013-03-05 01:42:44 +01:00
Gosha Arinich
0c99dea153
introduce Enum
2013-03-01 21:16:36 +03:00
Gosha Arinich
6e5399d544
minor cleanup, using AR querying DSL over raw SQL in some places
2013-02-28 21:54:12 +03:00
Gosha Arinich
cafc75b238
remove trailing whitespaces ❤️
2013-02-26 07:31:35 +03:00
Robin Ward
03a798b202
Can clear flags on deleted posts if you're a moderator
2013-02-08 19:07:29 -05:00
Robin Ward
12d3c3b66b
Enforce entropy on flag text
2013-02-08 17:01:43 -05:00
Robin Ward
db0c73e874
Replace all those `deleted_at`s with `acts_as_paranoid`
2013-02-08 16:16:09 -05:00
Robin Ward
50ef0c16bb
Removed most manual SQL from PostAction
2013-02-08 16:16:03 -05:00
Jakub Arnold
61654ab8f0
Fix all the trailing whitespace
2013-02-07 16:45:24 +01:00
Sam Saffron
c7461622a9
admins can now clear flags inline
2013-02-07 15:15:48 +11:00
Sam Saffron
f79f0e740a
Don't allow users to double flag stuff
...
Correct seed fu to match model
2013-02-07 10:45:58 +11:00
Sam Saffron
6f2f7b0589
flagging work, we should be clearing from the mod menu if a topic or post is deleted
2013-02-06 12:13:41 +11:00
Robin Ward
21b5628528
Initial release of Discourse
2013-02-05 14:16:51 -05:00