Commit Graph

1317 Commits

Author SHA1 Message Date
Neil Lalonde 9828c87525 Topic Auto-Close: admins and mods can set a topic to automatically close after a number of days 2013-05-13 12:53:52 -04:00
Sam 9b33e826f2 clear flags on reply to notify moderators 2013-05-13 11:48:01 +10:00
Robin Ward cf01c98d81 Experimental: Interface to Move Posts to an Existing Topic 2013-05-10 14:55:51 -04: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 0f0fd281a8 group progress, never email banned users 2013-05-09 11:34:58 +10:00
Sam 6b536dcde5 work in progress ... groups 2013-05-08 15:20:38 +10:00
Sam 7571152d1d fix issue adding users to groups 2013-05-08 10:32:29 +10:00
Neil Lalonde f9a82f3aa0 Add a spec for category list with empty category 2013-05-07 15:52:45 -04: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
Neil Lalonde 69be7d0ad1 Change the title Visits to Clicks in referral tables on admin dashboard 2013-05-06 11:56:35 -04:00
Sam be1ab8b275 automatic group infrustructure 2013-05-06 14:49:56 +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
Neil Lalonde 3c7afeb233 Fix incoming links dashboard data when topic record can't be found 2013-05-01 19:10:31 -04:00
Neil Lalonde 38ed86d0c5 Add reports for IncomingLinks on admin dashboard 2013-05-01 18:12:02 -04:00
Sam 08ce46e7ed :s/POST/REPLY/g 2013-05-01 10:52:31 +10:00
Sam acc4f73ba0 very subtle, autospec was not using inotify if guard was already running 2013-04-30 22:54:52 +10:00
Sam Saffron 94a578e4b2 ignore assets
fix runner so it works on mac
get rid of some test warnings
2013-04-30 12:43:59 +10:00
Neil Lalonde dc07563c0d Add unstarred_at column to topic_users so we can permanently track when topics are starred 2013-04-29 11:39:05 -04:00
Sam 5cfcdc7ef0 backend for secure categories mostly done (todo pm groups) 2013-04-29 16:33:43 +10:00
Sam f9e33ec6b8 store ip address and current user with incoming links
make links long an readable in share dialog
2013-04-26 16:18:55 +10:00
Sam 14f33b80e4 lets not let without a block rspec gets very upset 2013-04-26 16:18:54 +10:00
Sam 37867af1bb track incoming links, amend share link to include user
fix pm styling
2013-04-24 18:05:35 +10:00
Sam cfc62dadff speed up tests
add the ability to find the first notify private message
2013-04-22 17:45:03 +10:00
Sam 8827dd3e42 speed up tests 2013-04-22 13:48:41 +10:00
Sam aea988a447 before:
Finished in 6.38 seconds

after:

Finished in 1.52 seconds
2013-04-22 11:05:54 +10:00
Jeff Atwood b64a4100fa change "visitor" trust level to "new user"
I blame me for this mistake.. visitor means other stuff in practice. New
User is correct meaning.
2013-04-17 16:11:24 -07:00
Neil Lalonde 3b6aeb14c7 Add subtype to topics to classify private messages 2013-04-16 16:56:18 -04:00
Régis Hanol c2e58b61c9 automatically resizes images 2013-04-15 23:32:26 +02:00
Régis Hanol b24c1a1ad9 better consistency around email case sensitivity 2013-04-15 02:20:33 +02:00
Neil Lalonde 651cfba93f Add ability to destroy a user with 0 posts 2013-04-12 16:53:00 -04:00
Sam 1725bf77a7 fix build 2013-04-12 21:09:41 +10:00
Sam 5551ef9418 ok I should not be coding to a deadline ... grrr 2013-04-12 18:15:19 +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
Neil Lalonde 36dc5874e5 Post image_count doesn't count favicons and thumbnails in oneboxes, so visitors can post links that get oneboxed 2013-04-11 12:36:45 -04:00
Sam 5f30ea7463 Merge pull request #684 from ZogStriP/auto-replace-rules-in-titles
auto replace rules in titles
2013-04-10 21:12:20 -07:00
Régis Hanol d120a5d139 FIX: setting min_topic_title_length is ignored 2013-04-10 14:54:10 +02:00
Régis Hanol c5cf8be864 auto replace rules in titles 2013-04-10 11:00:50 +02:00
Sam 9b487953c4 collapse some db tests
ensure deleted topics do not show up in user stream
2013-04-10 12:50:00 +10:00
Neil Lalonde 467d59ec5a Merge some work: topic counts in category select; fix All count on dashboard 2013-04-08 10:23:29 -04:00
Sam 73c508115a better consistency check 2013-04-08 13:02:20 +10:00
Sam 11ff0ccd03 correct logic for tracking the highest seen post number so its always consistent 2013-04-08 11:12:52 +10:00
Sam 3e9b782f3e save it ... 2013-04-08 08:21:54 +10:00
Régis Hanol 1692350336 added some tests for uploads 2013-04-07 17:52:46 +02:00
Robin Ward 72b4f41254 Can change TOS content via site content editor 2013-04-05 15:21:55 -04:00
Neil Lalonde eb212aec9b Fix dashboard totals for topics, posts, and private messages 2013-04-05 14:09:16 -04:00
Sam a2cca2540e some minimal site settings diags
fix issue where days_visited was totally out of sync
2013-04-05 17:47:54 +11:00
Sam 4fbf017272 get regular trust level going, self heal inconsistent topic timings 2013-04-05 15:30:28 +11:00
Robin Ward fa1ba6791b Work in Progress: Content Editing in Admin Section 2013-04-04 17:26:22 -04:00
Sam e61a28f3e1 utc vs non utc is a subtle issue, tests were failing for a few hours every day cause of this 2013-04-04 13:29:54 +11: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
Robin Ward 79c986dd92 Fix issue with duplicate slugs 2013-04-01 12:26:51 -04:00
Robin Ward f9ea1a448d Merge pull request #600 from kubabrecka/consistent_topic_count
make sure Category.topic_count is consistent with week/year stats
2013-04-01 07:37:07 -07:00
Philipp Weissensteiner c34f476b31 Improve suggest_username method in user.rb
The suggest_username method showed up on codeclimate
so I thought I'd give it some love and make it more readable.
In the process removed trailing whitespaces and had to fix a
terrible spelling error :)
2013-03-31 19:01:11 +02:00
Kuba Brecka d50b5e1fd8 make sure Category.topic_count is consistent with week/year stats 2013-03-31 13:22:05 +02:00
Neil Lalonde 436515ec6c Dashboard checks for facebook, twitter, and github configs 2013-03-29 13:32:40 -04:00
Robin Ward 3d615ada12 Merge pull request #583 from wpp/add_some_user_specs
Add a few specs to user model
2013-03-29 10:01:32 -07:00
Robin Ward a0867bff24 Topic Statuses need to be updated by those who have access. I have self flaggelated
as punishment for checking in broken specs before running out earlier.
2013-03-29 02:38:54 -04:00
Philipp Weissensteiner 095cbaa093 Add a few specs to user model
I noticed a few assertions of the has_many type were missing.
Also added a couple of specs which were testing in one direction only.
Just tipping my toes in discourse hope this helps a little.
2013-03-29 00:24:35 +01:00
Robin Ward 473a64d39d Add score, percent_rank to topics. Adds `HotTopic` model and consolidated job to calculate
hotness. Note: People on Heroku will have to update their jobs to the new structure
in Heroku.md
2013-03-28 15:39:54 -04:00
Robin Ward 36269cfbaa Rename 'popular' to 'latest'. First stab at 'Hot' tab. 2013-03-27 16:21:23 -04:00
Robin Ward af7f6fea28 Can set the `hotness` of a category. For the soon to be implemented "hotness" tab. 2013-03-26 18:08:58 -04:00
Robin Ward c372e36cb6 Don't count @mentions as links in a post 2013-03-25 13:12:15 -04:00
Robin Ward 6568b4aaa9 Better error messages when hitting max mentions/images/links 2013-03-25 12:27:09 -04:00
Sam deb603f41c Merge pull request #547 from kid0m4n/convert-ruby-1-9-syntax
Convert a lot of :a => b to a: b and bring peace to the world
2013-03-24 16:43:17 -07:00
Karan Misra 5dfb04e4b3 Convert a lot of :a => b to a: b and bring peace to the world 2013-03-25 05:07:36 +05:30
Sam 36a069488e Merge pull request #492 from sbauch/email-whitelist
added email whitelist SiteSetting feature to replicate email blacklist S...
2013-03-24 16:35:24 -07:00
Régis Hanol 7d43058d20 FIX: Email notification for different user being mentioned 2013-03-24 01:57:00 +01:00
Neil Lalonde aa6e87c5c1 Dashboard memory warning 2013-03-22 15:47:35 -04:00
Robin Ward 9c38c13ac5 The "Best Of" mode uses a percentage ranking of posts. 2013-03-22 15:44:39 -04:00
Sam Bauch 77e3434d81 added email whitelist SiteSetting feature to replicate email blacklist. email_validator method now also uses the regex method for both the whitelist and blacklist. 2013-03-22 14:49:42 -04:00
Neil Lalonde 6f8d13d47e Dashboard warning when sidekiq is not running 2013-03-22 11:35:51 -04:00
Neil Lalonde 8cc7f3c20b Dashboard warning when clockwork doesn't seem to be running 2013-03-21 16:51:50 -04:00
Robin Ward babcfe6234 Cache oneboxes in Redis now instead of postgres. 2013-03-21 13:11:54 -04:00
Neil Lalonde d28d81a590 Dashboard warning when GC params are default 2013-03-20 16:16:23 -04:00
Neil Lalonde c8508d3f26 Dashboard warning when host_names is localhost 2013-03-20 15:38:28 -04:00
Neil Lalonde c3c25b894a Cache dashboard data in the controller, not the report model 2013-03-20 13:54:32 -04:00
Neil Lalonde 1e4dd3ea0c Start detecting install problems and report them on the admin dashboard. This commit adds check for Rails.env 2013-03-20 12:00:52 -04:00
Sam 62c60540be pull moderator into own column, rename trust levels 2013-03-19 21:06:11 -07:00
Robin Ward 49c66037b1 Moved deleting tests to post_destroyer_spec 2013-03-19 14:15:08 -04:00
Robin Ward 59fc3bfac4 PostDestroyer to replace callbacks for destroying 2013-03-18 17:55:11 -04:00
Robin Ward c1e40f5d19 Convert Post type constants to Enum 2013-03-18 17:55:05 -04:00
Robin Ward 897d48b145 Moved more `Post` callbacks into service classes 2013-03-18 17:54:55 -04:00
Robin Ward d5e4243f02 Move draft sequence incrementing out of `after_save` 2013-03-18 17:54:50 -04:00
Robin Ward 5aec5261a7 Converted flag threshold constants to enums 2013-03-18 17:54:43 -04:00
Robin Ward aea848f164 Move MessageBus observer into PostCreator 2013-03-18 17:54:39 -04:00
Robin Ward b6224b014c Move a bunch of callbacks into PostCreator 2013-03-18 13:56:26 -04:00
Neil Lalonde 50b04b2209 Add email counts to admin dashboard 2013-03-18 10:08:09 -04:00
Neil Lalonde 6a99d12784 Add likes to admin dashboard 2013-03-18 10:08:08 -04:00
Neil Lalonde 0e63de59b5 Comment out report_spec.rb for now because it fails sometimes 2013-03-16 19:42:23 -04:00
Neil Lalonde d9cdde9aa7 Add user counts for each trust level to admin dashboard 2013-03-15 18:09:02 -04:00
Neil Lalonde 8983df9856 Show current user count for now, not at different points in time 2013-03-15 18:09:01 -04:00
Robin Ward 1a60301a17 Merge branch 'fixes-topic-title-length-too-short' of git://github.com/ZogStriP/discourse
Conflicts:
	app/assets/javascripts/discourse/controllers/composer_controller.js
	app/assets/javascripts/discourse/views/composer_view.js
	config/locales/client.en.yml
2013-03-15 16:49:17 -04:00
Robin Ward ad082cea70 Big commit:
- Support for a popup that shows similar topics
- Cleaned up a lot of Javascript
- Cleaned up use of Promises
2013-03-15 14:35:33 -04:00
Robin Ward ea20993bed FIX: Don't create a new version when a post is recovered. Also display username instead of full name for consistency. 2013-03-13 12:35:55 -04:00
Sam fcc6aac008 hacked dates so jeff sees no more 1mons everywhere. 2013-03-13 00:05:21 -07:00
Neil Lalonde 40c27ff3cf Add flag counts to admin dashboard 2013-03-12 14:40:59 -04:00
Neil Lalonde 4eda422cdf Add total users report; restructure dashboard reports js 2013-03-12 14:40:59 -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
Neil Lalonde f1908fd8e8 Fix report_spec so it's not so fussy and breaks sometimes 2013-03-11 10:40:13 -04:00
Regis Hanol 2039c0f704 fix the specs errors due to a change to the min topic title's length 2013-03-11 14:51:24 +01:00
Sam 621f946193 fuff with test so it passes 2013-03-10 19:58:42 -07:00
Neil Lalonde 8927432a93 Add stats to the admin dashboard 2013-03-09 15:34:27 -05:00
Robin Ward d1d4530efd User Profile enhancements:
- Added PreloadStore support to avoid duplicate requests
- preliminary SEO
- Support for opengraph/twitter cards
2013-03-08 15:04:37 -05:00
Robin Ward b8fd734d0e Merge branch 'refactor-category' of git://github.com/goshakkk/discourse
Conflicts:
	app/models/category.rb
2013-03-08 10:49:25 -05:00
Robin Ward 052887c296 Category Topics are no longer invisible, they are pinned. 2013-03-07 12:46:23 -05:00
Robin Ward f8d8272406 Cleaned up TopicUserSpec, introduces clearing of pinned topics 2013-03-07 12:19:25 -05:00
Robin Ward 30aae8e793 Topic was not sanitizing <b> and <img> tags from titles 2013-03-06 11:36:42 -05:00
Gosha Arinich a1825fece9 refactor Category
* move callback bodies to separate methods (easier to test)
2013-03-05 21:09:13 +03:00
Brian Kim 1f94ac154b Fix order dependency in site_setting_spec.rb
The spec contained an order dependency which would cause the default
bool test to fail. You can confirm this by running the spec with the
option "--order rand" a couple times. This dependency was caused by
surprising behavior in SiteSetting::setting as shown below:

SiteSetting.setting(:bool_setting?, false)
SiteSetting.refresh!
SiteSetting.bool_setting? #=> false
SiteSetting.random_setting = true
SiteSetting.bool_setting? #=> true
SiteSetting.setting(:bool_setting?, false)
SiteSetting.refresh!
SiteSetting.bool_setting? #=> true!

The spec is merely desriptive, and I have labeled what I think could be
possible bugs.
2013-03-04 11:18:05 -05:00
Robin Ward d410f043a9 Merge pull request #290 from alxndr/category-rss
RSS for topics in a category
2013-03-01 12:01:26 -08:00
Gosha Arinich 0c99dea153 introduce Enum 2013-03-01 21:16:36 +03:00
Alexander fd240c1967 RSS for topics in a category
Creates a new route for category RSS
2013-03-01 09:52:59 -08: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 d2f3c829db refactor User and TrustLevel a bit
* rename `User#password_required` to `User#password_required!`
* emails with "i" @ something are a special case as well
* get rid of `self.` and returns where possible
* prefer "unless a" instead of "if !a"
* `unread_notifications` without manually iterating
* introduce `User#moderator?`
* introduce `TrustLevel#valid_key?`, `TrustLevel#compare`, and
  `TrustLevel#level_key`
2013-02-28 19:15:54 +03:00
Robin Ward dc8e1196fd Code to support EmberJS + Discourse Tutorial feature: Admin Reports 2013-02-27 22:40:36 -05:00
Robin Ward 7c1ae451fe Send emails to users who are watching topics 2013-02-27 15:38:44 -05:00
Robin Ward cf867a35ff Merge pull request #271 from goshakkk/topic-refactor
Refactor Topic
2013-02-27 10:32:44 -08:00
Alexander 8855a0bfbe RSS of a topic via new route
Adds TopicView#recent_posts; Post#by_newest, #with_user, #author_readable; User#readable_name
Autodiscovery tag in topic show HTML.
2013-02-26 14:54:17 -08:00
Gosha Arinich 12d664a610 refactor Topic
* move finding by username/email to User
* make SiteSetting return a range of possible post title lengths
* remove unnecessary conditions
2013-02-26 19:27:59 +03:00
Gosha Arinich cafc75b238 remove trailing whitespaces ❤️ 2013-02-26 07:31:35 +03:00
Sam Saffron 77a2d8ccc4 fixed a pile of notification craziness
addes some tests around post timings
2013-02-25 18:42:42 +11:00
Robin Ward 532b1f5450 Can edit category descriptions, they show up in a `title` attribute 2013-02-22 13:43:47 -05:00
Neil Lalonde 85f8f8f2d5 Better checking of blacklisted emails on create and when email is being updated 2013-02-20 16:25:08 -05:00
Neil Lalonde 046c330858 Changes to email_domains_blacklist shouldn't invalidate existing users 2013-02-20 12:16:16 -05:00
Dan Neumann 37ca391f50 validate category user_id. 2013-02-19 21:24:38 -06:00
Robin Ward 836c3a7379 Support for Fancy topic titles 2013-02-19 16:14:04 -05:00
Robin Ward b7e027cfd1 Notifications on PMs respect access rights. 2013-02-19 12:59:46 -05:00
Sam Saffron d520771c73 move stylesheet cache into the upload dir so its less crazy to sync across servers 2013-02-19 11:02:00 +11:00
Dan Neumann fac75401ef category stats shouldn't include deleted topics. 2013-02-16 21:10:18 -06:00
Robin Ward b440e30f45 Better filtering out private messages on user stream. 2013-02-15 17:08:28 -05:00
Sam Saffron 6c73b3a971 bookmarks should only show up in a users stream 2013-02-15 11:44:14 +11:00
Robin Ward 37b0c168bf Support non-english topic titles 2013-02-14 17:13:03 -05:00
Robin Ward 5d4efa9100 Support for non-english categories 2013-02-14 16:51:48 -05:00
Neil Lalonde 39eab7c425 Replace mentions of mothership with discourse_hub 2013-02-14 12:57:26 -05:00
Neil Lalonde aaf96f1e29 Replace email_blacklist_regexp with email_domains_blacklist site setting 2013-02-13 22:45:43 -05:00
Robin Ward dee9e9a51f Fix bug where links to posts weren't being tracked 2013-02-13 15:23:09 -05:00
Robin Ward f00006ee7d Fix broken Yahoo! signup. 2013-02-13 12:37:48 -05:00
Neil Lalonde f850fe1e75 Implement the email_blacklist_regexp ssite setting 2013-02-13 12:28:39 -05:00
Sam Saffron 161420fac0 Added method for testing ember stuff
Collapse user actions in UI so it stops looking crazy
Removed dud dupe user action TOPIC_RESPONSE
Always show the owner of a post on the user page, actions by others at the bottom
2013-02-13 20:38:43 +11:00
Neil Lalonde 238032051e Users with no email_tokens return true from email_confirmed 2013-02-12 10:19:02 -05:00
Sam Saffron 925925817f remove old buggy code see: http://meta.discourse.org/t/quoted-you-emails/2226/3
notify by display name is silly, display name is not unique in the system
2013-02-12 18:49:57 +11:00
Sam Saffron 99526c33da emoji should not be coupled into the core
avatars were being counted and should not have been for basic users
2013-02-12 18:43:48 +11:00
Robin Ward 09e53c72d4 Changed our minds: Let's track internal links, just never to users. Something like FAQ is useful. 2013-02-11 12:36:33 -05:00
Neil Lalonde c18b85873f Prevent login until email is confirmed 2013-02-11 11:18:37 -05:00
Robin Ward f21609fe2e Don't track links within discourse unless they're to other topics. 2013-02-11 11:11:48 -05:00
Sam Saffron 6fb78809c2 better support for multi host in site customization 2013-02-10 23:05:11 +11:00
Grant Ammons 701ecddac2 factor out @post.revise into its own class. clean up PostRevisor class to be more readable 2013-02-09 10:33:25 -05:00
Cyril Mougel 84191802df Extract the validation of Username format in own class to avoid
complexity in user model object
2013-02-08 12:54:47 -05:00
Grant Ammons a8c106bba6 use shared_examples_for versioning, for both posts and topics 2013-02-08 08:17:05 -05:00
Neil Lalonde 79dfccf717 Username validation in signup and username change forms 2013-02-07 18:23:52 -05:00
Robin Ward 63c0fdda44 Merge pull request #57 from blowmage/user_search_refactor
Refactor UserController#search_users
2013-02-07 12:38:39 -08:00
Robin Ward 084a873b91 Give regular users a delete button. If they click it, their post will be revised to
say it was deleted.
2013-02-07 15:14:23 -05:00
Mike Moore d72c26ff92 Refactor UserSearch tests 2013-02-07 09:35:38 -07:00
Sam Saffron 4fcd924797 I committed a regression around multi site today and site customization, added tests so it don't happen again 2013-02-08 00:55:04 +11:00
Sam Saffron 85973ce6b0 added delete all posts button
wired up the ability to enable all themes
2013-02-07 18:11:56 +11:00
Sam Saffron 8f4417f962 Merge branch 'master' of github.com:discourse/discourse 2013-02-07 16:00:55 +11:00
Sam Saffron 7b123e12dd improving flag handling, links and delete button 2013-02-07 16:00:40 +11:00
Sam Saffron c7461622a9 admins can now clear flags inline 2013-02-07 15:15:48 +11:00
Robin Ward 7d7d8c7d4f Merge branch 'master' of github.com:discourse/discourse 2013-02-06 20:59:07 -05:00
Robin Ward 40da901e5d Introduction of TextSentinel to enforce title and body quality. 2013-02-06 20:53:34 -05: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
Robin Ward 2d2b907d2c Temporary Nuclear option on topic titles - disallow non ascii characters so we
can stay on top of the trolls. This is meant to be replaced soon with a more
permissive and safe method of sanitizing.
2013-02-06 15:47:36 -05:00
Andy 66022f9faa Updated email hash to Gravatar specifications
Gravatar email hashes have two requirements:
* Whitespace must be trimmed
* Email should be downcased
2013-02-05 21:16:15 -07: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