Commit Graph

119 Commits

Author SHA1 Message Date
Régis Hanol
8d1da9cedd FEATURE: keep original title when sending email notifications about a PM 2016-02-23 01:34:16 +01:00
Sam
f0e942f647 PERF: move 3 more option columns out of the user table 2016-02-18 16:57:22 +11:00
Sam
3829c78526 PERF: shift most user options out of the user table
As it stands we load up user records quite frequently on the topic pages,
this in turn pulls all the columns for the users being selected, just to
discard them after they are loaded

New structure keeps all options in a discrete table, this is better organised
and allows us to easily add more column without worrying about bloating the
user table
2016-02-17 18:08:25 +11:00
Sam Saffron
4099823efe FIX: batch badge assigner was not including full info in notification
(missing drilldown link in notification)
2016-02-01 18:27:07 +11:00
Arpit Jalan
cf1bd35fc6 FIX: while changing site text, old and new values can be nil 2016-01-18 20:56:14 +05:30
Sam
cba76db53b FIX: if people link own post, watchers not notified 2015-12-31 10:51:58 +11:00
Arpit Jalan
4c967d11b4 FEATURE: log site text changes 2015-12-18 19:42:06 +05:30
Guo Xiang Tan
8b6b3cf858 FIX: Admin logging should not log permissions if none has been set. 2015-12-06 15:29:13 +08:00
Andy Waite
3e50313fdc Prepare for separation of RSpec helper files
Since rspec-rails 3, the default installation creates two helper files:
* `spec_helper.rb`
* `rails_helper.rb`

`spec_helper.rb` is intended as a way of running specs that do not
require Rails, whereas `rails_helper.rb` loads Rails (as Discourse's
current `spec_helper.rb` does).

For more information:

https://www.relishapp.com/rspec/rspec-rails/docs/upgrade#default-helper-files

In this commit, I've simply replaced all instances of `spec_helper` with
`rails_helper`, and renamed the original `spec_helper.rb`.

This brings the Discourse project closer to the standard usage of RSpec
in a Rails app.

At present, every spec relies on loading Rails, but there are likely
many that don't need to. In a future pull request, I hope to introduce a
separate, minimal `spec_helper.rb` which can be used in tests which
don't rely on Rails.
2015-12-01 20:39:42 +00:00
Sam
d1a5d8ea62 FEATURE: show group mentions and topics in groups page 2015-12-01 16:52:43 +11:00
Sam
ad3dd161e7 FEATURE: first class group mentions built in
If you allow a group to be mentioned it can be mentioned with the @ symbol.

Keep in mind as a safety mechanism max_users_notified_per_group_mention is set to 100
2015-11-30 17:08:43 +11:00
Neil Lalonde
84342ecdef FIX: anonymized user's preferences should have system assigned avatar chosen 2015-11-27 14:37:30 -05:00
Robin Ward
d65ec1af2e Rename ninja_edit_window to editing_grace_period :'( 2015-11-24 14:28:42 -05:00
Guo Xiang Tan
d9fe78da20 FIX: Topic#last_posted_at was not being set when changing topic timestamp. 2015-10-20 10:12:52 +08:00
Robin Ward
eacd75bcf8 SECURITY: Unread post notifications should respect whispers 2015-10-19 16:32:10 -04:00
Guo Xiang Tan
f39b9124b6 FEATURE: Log staff actions for Category changes. 2015-09-18 10:53:08 +08:00
Neil Lalonde
354a3f9638 add test for auth_token being cleared by user anonymizer, which it already does 2015-09-10 11:17:48 -04:00
Sam
262f561a87 FEATURE: relax username rules to allow - and . and leading _
This relaxes our very strict username rules to allow for some long asked for requests

- leading _ is now allowed
- . is allowed except for trailing char and confusing extensions like .gif .json
- dash (-) is now permitted
2015-09-02 12:13:44 +10:00
Arpit Jalan
10b8e43a92 FIX: send new email activation token if the original token expired 2015-08-24 12:00:00 +05:30
Sam
94f05a40de FIX: when destroying users we were leaving drafts behind 2015-08-24 16:05:08 +10:00
Guo Xiang Tan
89f4ebfb36 Fix timestamp comparison in tests.
Follow up to 58190c92e9.
2015-08-22 10:12:02 +08:00
Guo Xiang Tan
c7a21b7c23 FEATURE: Allow admin to change timestamp of topic. 2015-08-17 00:00:05 +08:00
Sam
5ee4d3ba8c FIX: log post deletion even if user is deleted. 2015-08-14 13:57:02 +10:00
Sam
5ab7f7e88d FIX: double like notification
If you got a like -> edit/quote/etc -> like you would get a
double notification
2015-06-19 12:31:36 +10:00
Neil Lalonde
3a67c02c7a FIX: change topic creator wasn't removing the topic from the previous creator's activity stream 2015-05-29 17:39:36 -04:00
Sam
1e4c7dfbe7 FIX: invalid plan generation when % in query on badge definition UI 2015-05-28 16:06:22 +10:00
Régis Hanol
d4974b7093 FIX: anonymous mode don't work when names are required 2015-05-15 14:20:15 +02:00
Arthur Neves
b8cbe51026
Convert specs to RSpec 2.99.2 syntax with Transpec
This conversion is done by Transpec 3.1.0 with the following command:
    transpec

* 424 conversions
    from: obj.should
      to: expect(obj).to

* 325 conversions
    from: == expected
      to: eq(expected)

* 38 conversions
    from: obj.should_not
      to: expect(obj).not_to

* 15 conversions
    from: =~ /pattern/
      to: match(/pattern/)

* 9 conversions
    from: it { should ... }
      to: it { is_expected.to ... }

* 5 conversions
    from: lambda { }.should_not
      to: expect { }.not_to

* 4 conversions
    from: lambda { }.should
      to: expect { }.to

* 2 conversions
    from: -> { }.should
      to: expect { }.to

* 2 conversions
    from: -> { }.should_not
      to: expect { }.not_to

* 1 conversion
    from: === expected
      to: be === expected

* 1 conversion
    from: =~ [1, 2]
      to: match_array([1, 2])

For more details: https://github.com/yujinakayama/transpec#supported-conversions
2015-04-25 11:18:35 -04:00
Robin Ward
151b559e4c FIX: If you delete a user, delete their queued posts as well. 2015-04-24 16:04:44 -04:00
Sam
4bfca12b11 FEATURE: anonymous_account_duration_minutes , cycle anon accounts after N minutes from last post
fixes it so anon users can not like stuff
2015-04-08 12:30:02 +10:00
Sam
f5d89169e2 FEATURE: initial implemenation of anonymous posting mode 2015-04-07 18:05:31 +10:00
Sam
14741b5dac FIX: only ONE user on site could have a list of muted users 2015-03-31 10:16:23 +11:00
Sam
92e371f0b3 FEATURE: civilized mute
Allow user to mute all notifications generated by specific users
2015-03-24 11:55:22 +11:00
Neil Lalonde
2585962552 fix spec that can fail when comparing timestamps. I only care that it isn't null. 2015-03-11 16:51:29 -04:00
Neil Lalonde
dece5a351a more fixes for post ownership change and user deletion 2015-03-11 15:54:20 -04:00
Neil Lalonde
608647d02f FEATURE: Anonymize User. A way to remove a user but keep their topics and posts. 2015-03-10 11:59:08 -04:00
Neil Lalonde
35c58c1b00 FIX: after changing post owner, profile pages still showed previous owner and incorrect topic and post counts 2015-03-03 14:15:11 -05:00
Neil Lalonde
1bf4f34049 FIX: topic and post counts are not updated when ownership of a post is changed 2015-03-02 12:13:21 -05:00
Sam
b760d22460 PERF: avoid expensive order by random for suggested topics 2015-02-25 17:19:12 +11:00
Robin Ward
4e64d16a47 FEATURE: Allow plugins to log staff actions 2015-02-05 15:26:34 -05:00
Robin Ward
b2e2a99898 FIX: Don't raise an error when trying to log nothing 2014-12-15 14:14:12 -05:00
Robin Ward
cb0e7a5724 For performance reasons, use delete_all when removing a user's email logs 2014-11-28 14:20:43 -05:00
Régis Hanol
4e735e8aab FIX: roll up staff action wasn't working 2014-11-27 01:12:56 +01:00
David McClure
efc4109902 update specs to remove deprecation warnings 2014-11-07 06:05:44 -08:00
Régis Hanol
e7f251c105 LOTS of changes to properly handle post/topic revisions
FIX: history revision can now properly be hidden
FIX: PostRevision serializer is now entirely dynamic to properly handle
hidden revisions
FIX: default history modal to "side by side" view on mobile
FIX: properly hiden which revision has been hidden
UX: inline category/user/wiki/post_type changes with the revision
details
FEATURE: new '/posts/:post_id/revisions/latest' endpoint to retrieve
latest revision
UX: do not show the hide/show revision button on mobile (no room for
them)
UX: remove CSS transitions on the buttons in the history modal
FIX: PostRevisor now handles all the changes that might create new
revisions
FIX: PostRevision.ensure_consistency! was wrong due to off by 1
mistake...
refactored topic's callbacks for better readability
extracted 'PostRevisionGuardian'
2014-10-27 22:06:43 +01:00
Régis Hanol
10094a0bcd FIX: resolve flags as good when deleting a spam user 2014-10-20 16:59:06 +02:00
Sam
f834a5fe4e correct spec 2014-10-09 22:27:34 +11:00
Sam
0e7be81e60 FIX: badge granted titles were not being revoked when badge was revoked 2014-10-08 10:26:18 +11:00
Régis Hanol
98b6b9821a FEATURE: log topic/post deletions from staff members 2014-10-01 17:40:13 +02:00
Régis Hanol
de76b512c1 fix most deprecations in the specs (still some left) 2014-09-25 17:44:48 +02:00