Robin Ward
fcff4e80d1
New user_stats
table to keep track of queried information on a user.
...
This is information that is not usually needed when representing a user
and is in a separate table with a has one relationship to avoid querying
it all the time.
2013-09-11 14:50:26 -04:00
Robin Ward
2319924206
Adds a class that can detect whether a user has uploaded a custom avatar
2013-09-10 15:39:11 -04:00
Sam
162d94aa02
improve secure_category_id query
2013-09-10 14:29:02 +10:00
Sam
41a1b6942d
notify moderators now goes to the "community" user, that saves our poor mods from a flood of pms
...
if any staff respond to a pm they are automatically added to the list of recipients and will start
getting email notifications
2013-09-06 14:07:23 +10:00
Neil Lalonde
117fc8db58
Change the way nuked users' posts are handled. Allow null in the user_id column of posts. Show these posts in the posts stream.
2013-09-04 15:42:21 -04: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
Sam
dfa5a8a83f
annotate models
2013-08-28 10:52:06 +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
Sam
472f0684c3
Merge pull request #1345 from salbertson/refactor-find_by_username_or_email
...
Improve test coverage and refactor User.find_by_username_or_email
2013-08-22 17:14:06 -07:00
Neil Lalonde
3b15e2e58e
Banned users are not returned as pending review users
2013-08-22 19:23:49 -04:00
Scott Albertson
1dbe1fb1bc
Refactor User.find_by_username_or_email
...
* Improve test coverage
2013-08-22 09:40:07 -07:00
Sam
c0c929be5a
optimise query that runs every 10 minutes and takes out the user table
2013-08-20 17:40:22 +10:00
Michael Kirk
4af8a9102e
Authenticate with Discourse via OAuth2
...
See https://github.com/michaelkirk/discourse_oauth2_example for an
example of how you might integrate your existing oauth2 provider's
authentication via a Discourse plugin.
2013-08-17 21:45:20 -07:00
Régis Hanol
2119774fb6
FIX: custom avatars in email
2013-08-16 09:58:20 +02:00
Régis Hanol
c9969738bf
FIX: N+1 query for avatars when searching for users
2013-08-16 00:26:49 +02:00
Sam
b55c9e391d
Merge pull request #1333 from fabianoleittes/fix_type_url
...
Fix url not to be nil
2013-08-14 20:04:00 -07:00
Fabiano Leite
4df8babb9a
Fix url not to be nil
2013-08-14 21:55:25 -03:00
Robin Ward
8fa9c51bf4
FIX: New avatar regression with mixed case email addresses.
2013-08-14 13:05:57 -04:00
Régis Hanol
4866f4d8f5
FIX: N+1 query for avatars
2013-08-14 15:25:05 +02:00
Régis Hanol
5ca187ba57
only the host part of an email address is case insensitive
2013-08-14 19:31:35 +02:00
Régis Hanol
c867b67a0b
custom avatar support
2013-08-13 22:08:29 +02:00
Robin Ward
6452962f36
FIX: Notification counters were being updated incorrectly.
2013-08-09 12:12:56 -04:00
Neil Lalonde
5f8a130277
Add BlockedEmail, to block signups based on email. Track stats of how many times each email address is blocked, and last time it was blocked. Move email validation out of User model and into EmailValidator. Signup form remembers which email addresses have failed and shows validation error on email field.
2013-07-29 15:29:43 -04:00
Doug Alcorn
35a2bb7919
Parameterize the PBKDF2 algorithm in application config
...
http://meta.discourse.org/t/sso-between-discourse-and-xmpp/8567/5
2013-07-22 21:36:01 -04:00
Sam
ecf17cfebb
work in progress, add fidelity to category group permissions (full, create posts, readonly)
2013-07-16 15:46:11 +10:00
Sam
1aef6de4b0
automatically approve invited users on forum where moderators must approve (keep in mind only moderators can invite)
...
speed up specs a touch
allow invite controller to accept an email in absence of user (cleans up API)
2013-07-11 11:22:00 +10:00
Neil Lalonde
9b0f63627b
Add blocked users count to dashboard
2013-07-08 12:44:13 -04:00
Juan de Dios Herrero
27b038cd40
Refactored username validations to avoid repeated code
2013-07-07 13:05:18 +02:00
Juan de Dios Herrero
e4fc6e02ed
Added discourse hub nickname operations simplify and avoid repeated code
2013-07-07 12:40:35 +02: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
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
6b82f1047a
that date there is on purpose for date boundries
2013-06-28 16:08:48 +10:00
Sam
1ec12fc808
this spec is just refusing to work on jenkins
2013-06-28 16:07:36 +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
Neil Lalonde
b1d0f30379
Fix AdminUser bulkApprove; add a way to approve a user without sending them the welcome email for cases when must_approve_users is enabled and there are existing users
2013-06-26 13:24:30 -04:00
Dmitriy Budnik
d12288de49
adding a missing User association
2013-06-24 17:08:49 +03:00
Sam
298949a343
missing dependency
2013-06-23 14:32:46 +10: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
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
Régis Hanol
454636abf1
annotate models
2013-06-17 02:49:34 +02:00
Juan de Dios Herrero
36fe8fbc6d
Added role scopes to roleable
2013-06-07 18:26:06 +02:00
Juan de Dios Herrero
1b92d9d7f8
Added roleable module for User model
2013-06-07 12:33:48 +02:00
Chris Hunt
f6ce985121
Send activation email after user approved
2013-06-06 18:37:25 -07:00
Robin Ward
bac03a3369
Merge pull request #975 from jd-erreape/username_refactor
...
[WIP] Refactored user_name suggestion methods into a module
2013-06-06 08:12:29 -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
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
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
Neil Lalonde
2259e97d42
Add a count of blocked users on the dashboard
2013-06-04 11:53:19 -04:00
Sam
d2c1eb090e
Merge pull request #921 from nirnanaaa/postgres-truefalse
...
removed t's and f's from models
2013-05-30 21:38:26 -07:00
Sam
e93b7a3b20
more progress towards live unread and new counts, unread message implemented, still to implement delete messages
2013-05-30 16:49:57 +10:00
Sam
33ff87bf44
work in progress, live unread / new counters
2013-05-30 16:49:57 +10:00
nirnanaaa
364113a4d5
removed t and f 's from group model
...
removed t and f 's from user model as mentioned in #919
removed t's and f's from category model
2013-05-29 22:10:43 +02:00
Sam
46389754d6
Merge pull request #892 from eriko/cas_support
...
Cas support
2013-05-28 16:13:29 -07: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
Erik Ordway
1575ce7b10
add cas support with a few tests
2013-05-23 13:40:50 -07:00
Robin Ward
7a31630837
Search Refactor: Remove some manual SQL, make search data tables more idomatic Rails/AR
2013-05-22 16:31:13 -04: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
Leonard Garvey
b16705be0d
Clean up update_visit_record!
...
update_visit_record! appears to add user_visit record if one
doesn't exist and days_visited is simply a counter for the number
of visit records.
2013-05-18 16:02:06 +10:00
Leonard Garvey
32f4dfd2fb
DRY up the user model slightly
...
regular? is just the inverse of staff?
2013-05-18 16:00:35 +10:00
Josh Susser and Avdi Grimm
2acc80d192
Various idiomatic User refactorings.
2013-05-17 15:44:35 -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
eb71e9de24
opening move, don't get rid of green notification till the pm is read
...
TODO a way to list all unread PMs
2013-05-16 16:37:47 +10:00
Sam
b6bf95e741
speed up startup (avoid loading some gems on startup)
...
correct group permission leaks
add Discourse.cache for richer caching support
2013-05-13 18:04:03 +10:00
Sam
942f168ab6
UI still a tad rough, but we have a first pass of secure categories
2013-05-10 16:47:47 +10:00
Neil Lalonde
f35a44aeae
Add ability for admins and mods to send another activation email to a user, to activate an account, and deactivate an account
2013-05-08 10:10:47 -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
Sam
be1ab8b275
automatic group infrustructure
2013-05-06 14:49:56 +10: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
e4a76812a6
this is a slightly round about way of making our self oneboxes sane
...
shrunk avatar to 60px, added global whitelisting
2013-05-01 16:38:13 +10:00
Sam
5cfcdc7ef0
backend for secure categories mostly done (todo pm groups)
2013-04-29 16:33:43 +10:00
Neil Lalonde
75cfcbfa4f
Need to require email in user.rb because specs can start failing when running guard
2013-04-18 14:27:04 -04:00
Régis Hanol
b24c1a1ad9
better consistency around email case sensitivity
2013-04-15 02:20:33 +02:00
Philipp Weissensteiner
3dcb1905e3
Refactor user controller, create action, mostly.
...
The gist of the commit are a few improvements in the
create action, where:
* long boolean statemenst have been wrapped in smaller more readable
methods.
* the 3rd party user info creation has been extracted (still in controller)
* a small helper method for creating a new user from params (to reduce
visual clutter)
* specs have been added where I came across untested methods/branches
Other changes are more trivial like formatting and whitespace fixes.
Hope this helps. Regards.
2013-04-13 00:53:59 +02:00
Neil Lalonde
651cfba93f
Add ability to destroy a user with 0 posts
2013-04-12 16:53:00 -04:00
Sam
5273657537
a method called "adding_user_record" is annoying me. 5 lines of code replaced with 2
2013-04-05 17:53:39 +11:00
Sam
ea8d69fbd6
fix my broken test
2013-04-05 17:47:54 +11: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
a7f92ec0c1
topic reply count resync for each new post
2013-04-05 17:47: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
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
Gosha Arinich
bdfa9b0508
create the User.admins and User.moderators scopes
2013-03-29 09:52:09 +03: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
Sam
2a047df4f1
cache reply_to_user_id in post to eliminate a very nasty n+1 query
2013-03-19 16:54:23 -07:00
Sam
1cd26a7dcf
oops
2013-03-18 23:44:21 -07:00
Sam
dd03f44968
optimise
2013-03-18 23:18:15 -07:00
Neil Lalonde
d9cdde9aa7
Add user counts for each trust level to admin dashboard
2013-03-15 18:09:02 -04:00
Sam
e62bb9922e
exceptions are BAD
...
the old code wacked on 10ms to every home page request, for no real reason.
2013-03-10 19:11:33 -07:00
Neil Lalonde
8927432a93
Add stats to the admin dashboard
2013-03-09 15:34:27 -05:00
Sam
325e28c3c8
wrong conditional
2013-03-08 17:24:54 -08:00
Robin Ward
4c7b0a42b5
Oops escape everything but image urls
2013-03-08 16:17:56 -05:00
Robin Ward
908bba8c13
First stab at oneboxing of meta.discourse.org
2013-03-08 15:59:12 -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
f8d8272406
Cleaned up TopicUserSpec, introduces clearing of pinned topics
2013-03-07 12:19:25 -05:00
Robin Ward
6a63178411
Merge pull request #377 from kubabrecka/typos5
...
various typos in comments
2013-03-06 09:14:16 -08:00