Commit Graph

116 Commits

Author SHA1 Message Date
Sam
90139efc6f Fix spec, remove pointless have_many etc preamble 2014-03-17 12:47:47 +11:00
Vikhyat Korrapati
9b26c8584e Initial badge system implementation. 2014-03-14 21:49:26 +05:30
Régis Hanol
8214536614 BUGFIX: don't show redirect reason if you aren't redirected
Move the redirect to top page logic server-side and make sure the reason
is not shown when top is not in the navigation menu (top_menu).
2014-03-07 18:58:53 +01:00
Stephen Birarda
4a2dab9c5e allow for custom min_username_length
change constant in user to be global range and not default
2014-03-04 16:37:05 -08:00
Erik Ordway
557d1886bb remove what little CAS testing there was. 2014-02-11 17:53:20 -08:00
Robin Ward
b61df08d1b FEATURE: Admin selector to choose a primary group for a user, display it
and apply a CSS class to their posts.
2014-02-10 17:00:15 -05:00
Neil Lalonde
7cc5da08fe Track how many posts a user reads each day in user_visits 2014-01-27 11:20:19 -05:00
Neil Lalonde
4f6b208e8d Posts by trust level 3 users do not have nofollow on their external links. 2014-01-15 11:40:51 -05:00
Régis Hanol
e732aa8a86 BUGFIX: we should not store absolute urls for locally uploaded avatar templates
Highly recommended to run: `RAILS_ENV=production bundle exec rake avatars:regenerate` to fix the avatar templates stored in the database.
2014-01-07 17:45:06 +01:00
Robin Ward
f145060315 Don't employ the "too many replies" if the user is staff, or if they created the topic.
See: http://meta.discourse.org/t/what-is-the-point-of-limiting-new-users-to-three-replies-per-topic/11696
2014-01-02 12:57:40 -05:00
Régis Hanol
82b78ec6ba schemaless avatar urls 2013-11-22 19:18:45 +01:00
Régis Hanol
3cf5a363f7 do not destroy uploads when destroying a user 2013-11-22 18:29:07 +01:00
railsaholic
34bba737ff Refactor SessionController#create, reduce complexity.
Don't compromise readablity
2013-11-15 22:09:03 +05:30
sirMackk
af67284995 User ctrl refactor - breaks up large methods, moves some logic into model
Includes missing methods from backup for travis to pass

fix missing code, failing specs

keep params handling in the controller.
2013-11-09 18:44:13 +05:30
Sam
95e936c299 cleanup API for looking up a user by email or username, add specs, fix invalid auto association in open id provider 2013-10-28 16:29:07 +11:00
Manoj
96ae3cdacc Utilize already existing method 'find_by_username_or_email'
check presence of email using include, dont use =~
2013-10-24 19:26:06 +05:30
Robin Ward
348e2e3ef2 Support for per-user API keys 2013-10-22 17:34:39 -04:00
Robin Ward
2308784713 Merge pull request #1543 from railsaholic/small_users_controller_refactoring
refactor UsersController to reduce complexity
2013-10-21 12:21:03 -07:00
Neil Lalonde
648b11a0eb Add screening by IP address. When deleting a user as a spammer, block all signups from the same IP address. 2013-10-21 14:50:18 -04:00
Manoj
868e4ffe6d refactor UsersController to reduce complexity
Refactored: UsersController#create
2013-10-19 15:18:11 +05:30
Manoj
7c03076c2a Refactored Topic#limit_topics_per_day to reduce code climate complexity
Extracted  1) #apply_per_day_rate_limit_for, method as generic
RateLimiter , 2) #limit_first_day_topics_per_day as a separate method,
3) Added User#added_a_day_ago?, 4) Fixed private methods indentation.
2013-10-16 14:58:18 +05:30
Sam
5bf26ec34e large refactor, ship a few columns from the user table into user_stats 2013-10-07 15:04:59 +11:00
Sam
61281a3c81 invite only forums had very wonky logic, invited users were not being activated, invite_only forums were still registering users 2013-08-28 17:18:31 +10:00
Navin Keswani
d87389b38e No more rails 4 deprecation warnings 2013-08-25 23:18:11 +02:00
Neil Lalonde
6e79197519 Enum site settings can have translatable names in dropdown. Add setting for how often users get digest emails by default: default_digest_email_frequency. 2013-08-23 17:36:25 -04:00
Scott Albertson
1dbe1fb1bc Refactor User.find_by_username_or_email
* Improve test coverage
2013-08-22 09:40:07 -07:00
Sam
31dac4b197 unseen users get no updates 2013-08-20 17:48:04 +10:00
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
89152116c6 Only send digests to active users 2013-07-11 18:47:36 -04:00
Neil Lalonde
a352b70bfc Permit changing my own username's case without an error saying it is already taken 2013-06-28 16:21:46 -04:00
Sam
1ec12fc808 this spec is just refusing to work on jenkins 2013-06-28 16:07:36 +10:00
Sam
ca6325a3fe a pile of complicated and hard to follow specs were replaced by something that makes sense to old people like myself 2013-06-28 15:38:47 +10:00
Sam
3c67cf8acd remove timecop, specs were failing and we can avoid it here anyway 2013-06-28 15:14:44 +10:00
Neil Lalonde
8e50b49cf1 Try to fix specs that are failing in jenkins 2013-06-27 17:23:06 -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
Chris Hunt
f6ce985121 Send activation email after user approved 2013-06-06 18:37:25 -07:00
Juan de Dios Herrero
96d23ddd8d Refactored user_name suggestion methods into a module to reduce the complexity of User model 2013-06-06 16:40:10 +02: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
Robin Ward
dfba2b6e0a FIX: Strip links from google indexed bios when the users are new. 2013-06-05 15:28:10 -04:00
Robin Ward
4392a17b54 Strip out links when displaying a new user's bio 2013-06-04 12:06:25 -04:00
Leonard Garvey
3de632f892 Added a spec for staff? and regular? 2013-05-18 18:07:07 +10: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
5ec52bd2e9 :s/moderator?/staff/g ... our naming was kind of crazy, renamed moderator? to staff 2013-05-02 17:22:27 +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
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
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
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
Sam
62c60540be pull moderator into own column, rename trust levels 2013-03-19 21:06:11 -07: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
Gosha Arinich
0c99dea153 introduce Enum 2013-03-01 21:16:36 +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
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
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
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
Neil Lalonde
aaf96f1e29 Replace email_blacklist_regexp with email_domains_blacklist site setting 2013-02-13 22:45:43 -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
Neil Lalonde
238032051e Users with no email_tokens return true from email_confirmed 2013-02-12 10:19:02 -05:00
Neil Lalonde
c18b85873f Prevent login until email is confirmed 2013-02-11 11:18:37 -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
Neil Lalonde
79dfccf717 Username validation in signup and username change forms 2013-02-07 18:23:52 -05: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
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
Robin Ward
21b5628528 Initial release of Discourse 2013-02-05 14:16:51 -05:00