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