Commit Graph

2207 Commits

Author SHA1 Message Date
Sebastian Gierlinger
3792598a31 Update spam prevention
closes #3468
- added rate limit to deny more than 5 attempt every hour
- updated spam prevention to be configurable
- added config values spamTimeout, ratePeriod, rateAttempts
- added ratePeriod:1 to config.example.js to prevent functional tests
from hitting the rate limit
- commented spam test, I’ll fix it tomorrow
2014-08-01 00:58:32 +02:00
Hannah Wolfe
a04562b349 Merge pull request #3478 from halfdan/fix-pgsql
Fixing pg build.
2014-07-31 20:55:21 +01:00
Hannah Wolfe
a13f460acb Merge pull request #3485 from jaswilli/migration
Fix naming of export file during migration
2014-07-31 20:55:12 +01:00
Hannah Wolfe
6413337c2f Merge pull request #3425 from jgable/fixImporter
Make importer more robust for tags
2014-07-31 20:52:51 +01:00
Hannah Wolfe
0b55b39cde Changing second half of script placeholders 2014-07-31 19:05:56 +01:00
Sebastian Gierlinger
c5fbe2def3 Merge pull request #3479 from ErisDS/issue-3079
Complete frontend multi-user features
2014-07-31 18:52:16 +02:00
Hannah Wolfe
687197bf31 Updating HTML for script placeholders 2014-07-31 17:42:43 +01:00
Jason Williams
8936b82014 Fix naming of export file during migration
No Issue
- The method that generates a filename for the export during
  a migration returns a promise, not the filename directly,
  so the export file was being named [object Object].
2014-07-31 16:22:05 +00:00
Hannah Wolfe
b7bfc35079 Merge pull request #3476 from rwjblue/moar-shortcuts
Enable uppercase, lowercase, titlecase shortcuts.
2014-07-31 16:50:11 +01:00
Robert Jackson
3cf9034c90 Cleanup CodeMirror shortcuts.
* Add titleize utility function.
  * Capitalizes first word.
  * Capitalizes all words not contained in simple article/conjunction
    list.
* Enable shortcuts for `uppercase`, `lowercase`, and `titlecase`.
* Fix header shortcuts
  * Ensure that header shortcuts do not duplicate text.
  * Make headers idempotent (pressing `ctrl+alt+1` then
    `ctrl+alt+2` does not make `# # # blah`.
2014-07-31 10:53:13 -04:00
Hannah Wolfe
45b4b95b1d Merge pull request #3477 from halfdan/duplicate-notification
Avoids duplicate notification / transition
2014-07-31 15:47:19 +01:00
Hannah Wolfe
194d45fac6 Merge pull request #3480 from jaswilli/issue-3466
Update user roles in store after owner transfer
2014-07-31 15:39:48 +01:00
Hannah Wolfe
1c3cb1bb6a Merge pull request #3472 from morficus/issue-3401
custom slugging capabilities for individual user pages
2014-07-31 15:36:11 +01:00
Hannah Wolfe
26af1e4843 Merge pull request #3471 from novaugust/editor-shortcuts
Keyboard shortcuts for Mac vs All
2014-07-31 15:34:14 +01:00
Hannah Wolfe
f9ff78475b Complete frontend multi-user features
closes #3076

- author RSS pages
- fixes page_url / pagination helper
- add 'author' option to has helper
- tests for author pages, author rss pages and helpers
2014-07-31 15:33:52 +01:00
Matt Enlow
a7444bf338 Keyboard shortcuts for Mac vs All
Closes #3029, Ref #3469
- Editor shortcuts are now built in a separate file, which uses `ctrlOrCmd` to correctly set OS specific shortcuts.
- Removed `newLine` and `selectWord` shortcuts
2014-07-31 08:00:52 -06:00
Jason Williams
baf9138b27 Update user roles in store after owner transfer
Closes #3466
- Transferring the owner role is now done via a separate
  endpoint and not through Ember-Data.  As a result the
  user role data needs to be updated manually.
- Updated the owner endpoint to return a response body
  containing the updated user objects.
- Updated tests.
2014-07-31 13:41:10 +00:00
Sebastian Gierlinger
87b07eb9e0 Merge pull request #3475 from ErisDS/api-clean
User edit & add endpoints cleanup
2014-07-31 15:24:55 +02:00
Sebastian Gierlinger
6ca9e6c657 Merge pull request #3462 from ErisDS/issue-3446
Post list: authors only see their own posts
2014-07-31 15:03:15 +02:00
Fabian Becker
640f4c2915 Fixing pg build.
refs #2499
- Properly reference pg client
- Fix broken sql queries
2014-07-31 12:52:57 +00:00
Fabian Becker
b26e0ec669 Avoids duplicate notification / transition
no ref
- Let application.js handle transition after setup
- Remove duplicate loading of server notifications
2014-07-31 14:22:37 +02:00
Maurice Williams
489cd08d97 custom slugging capabilities for individual user pages
closes #3401
- modifying slug-generator to be more generic
- adding slugging capabilities for /settings/users/:slug
- modified posts to use the updated slug-generator
2014-07-31 08:14:22 -04:00
Robert Jackson
93e728bba2 Redirect to the first available post for current user. 2014-07-31 12:44:22 +01:00
Hannah Wolfe
eecbdc1693 User edit & add endpoints cleanup
- edit and add endpoints don't assume role
- edit and add endpoints cope with no role, role objects, and strings
- resend user invite was failing at one point due to no role being sent, but this shouldn't be required
- other random api cleanup
2014-07-31 12:37:48 +01:00
Hannah Wolfe
23b2ac07d8 Completed post & user list filer by role
closes #3446, closes #3086

- Authors can only ever get to their own posts
- Editors only ever see authors in the user list
2014-07-31 11:23:37 +01:00
Hannah Wolfe
a6c205ac53 Merge pull request #3474 from felixrieseberg/iss3400
User Settings: Display cog based on rights
2014-07-31 09:30:13 +01:00
Felix Rieseberg
e84b6198c4 User Settings: Display cog based on rights
closes #3400
- The user view has been extended to have properties indicating whether
the user has rights to make the displayed user an owner or delete
him/her
- Handlebar conditionals decide whether or not to display the cog
2014-07-31 01:03:03 -07:00
Robert Jackson
f02c2acd71 Limit Posts for Authors.
* Ensures that posts listing only shows posts that the current user
  authored, if they only have the Author role.
* Do not transition into the posts.post route if the current user is
  not the author (but has the Author role). This is needed because
  the API server will always return the post (regardless of the current
  user).
2014-07-31 09:02:49 +01:00
Hannah Wolfe
7919c15e56 Post list: authors see their own posts
issue #3446
2014-07-31 09:02:48 +01:00
Hannah Wolfe
cc995e8ef6 Merge pull request #3371 from javorszky/iss3100
Implement user and related content deletion
2014-07-31 07:51:15 +01:00
Hannah Wolfe
7bf9d021de Merge pull request #3467 from rwjblue/update-validation-to-match-server-error
Update validation to match server error.
2014-07-31 07:46:57 +01:00
Matt Enlow
420500ffab Add keyboard navigation of posts
Closes #3015
- Added stepThroughPosts method to PostsRouter, takes a integer, goes that far, wraps around the array.
- PostsPostRoute notifies the PostsController of which model it currently has, to help stepThroughPosts know who's selected
2014-07-30 22:23:02 -06:00
Jacob Gable
69b871a754 Make importer more robust for tags
Closes #3242

- Add checks for valid fields in tags and posts
- Add unit test with empty tag export data file
- Add unit test with empty post export data file
2014-07-30 22:33:45 -05:00
Gabor Javorszky
8487dada0b Implement user and related content deletion
Closes #3100

* Introduces `destroyByAuhor`, given a context and an id, it will check if context has permission to delete the user by the id, and then deletes all the content where `author_id` is id, and then deletes the user
* Does multiple checks to make sure user exists
* Added a fixture `posts:mu` that creates 4 users belonging to 4 roles, 50 posts that have authors evenly distributed, 5 tags and all 50 have one tag attached to it, evenly distributed.

Caveats / questions

* Started testing
2014-07-31 03:48:59 +01:00
Hannah Wolfe
3de308dc20 Merge pull request #3436 from novaugust/user-role-dropdown
User role dropdown
2014-07-31 02:06:34 +01:00
Matt Enlow
21abed7f9a Add User Role Dropdown
Closes #3402, Closes #3428

-------------------

 ### Components
- Added GhostSelectComponent to handle async select creation (h/t @rwjblue)
- Added GhostRolesSelector (extends GhostSelect) for displaying user role options
- Created StoreInjector for surgically inserting the store into things that normally wouldn't have them.

 ### Users Settings
- InviteNewUserModal now uses GhostRolesSelector & defaults to Author
- The role dropdown for user settings has permissions set per 3402

 ### User Model
- Added `role` property as an interface to getting and setting `roles`
- Refactored anything that set `roles` to set `role`
- isAdmin, isAuthor, isOwner and isEditor are all keyed off of `role` now

 ### Tests
- Added functional tests for Settings.Users
- updated settings.users and settings.users.user screens
- fix spacing on screens

 ### Server Fixtures
- Fixed owner fixture's roles
2014-07-30 17:59:14 -06:00
Robert Jackson
bdbc689232
Update validation to match server error.
When a using the forgottenRoute if you enter an incorrectly formatted
email address you would see the error message 'Invalid Email', however
if you entered an email address that was correctly formatted but missing
the error message would be 'Invalid email address'.

This fixes the discrepancy.
2014-07-30 19:07:42 -04:00
Hannah Wolfe
9f21730648 Merge pull request #3465 from rwjblue/handle-missing-user
Redirect to error404 when user not found.
2014-07-30 22:51:03 +01:00
Hannah Wolfe
5dc457b417 Merge pull request #3443 from halfdan/30850-users-api
Users API advanced browsing
2014-07-30 22:47:55 +01:00
Robert Jackson
3bddb548a5
Redirect to error404 when user not found.
Closes #3459.
2014-07-30 17:43:45 -04:00
Hannah Wolfe
80cbef8cdb Merge pull request #3461 from halfdan/unhandled-rejection
Fix unhandled exception
2014-07-30 22:31:19 +01:00
Hannah Wolfe
c3308fbe2d Merge pull request #3463 from rwjblue/hard-refresh
Perform a hard refresh upon signout.
2014-07-30 22:28:27 +01:00
Hannah Wolfe
5d3788ffe6 Merge pull request #3457 from sebgie/issue#3426
Transfer ownership end point
2014-07-30 22:26:42 +01:00
Hannah Wolfe
8416839bde Merge pull request #3456 from PaulAdamDavis/prevent-auth-autocomplete
Disable autocomplete for setup & signup screens
2014-07-30 22:22:40 +01:00
Hannah Wolfe
06fb658829 Merge pull request #3454 from halfdan/signout-email
Properly remove email notification on signout.
2014-07-30 22:21:41 +01:00
Hannah Wolfe
3c47e630e8 Merge pull request #3453 from PaulAdamDavis/3271-prevent-website-autofill
Disable user settings autocomplete in Chrome
2014-07-30 22:14:32 +01:00
Hannah Wolfe
2251b58571 Merge pull request #3449 from felixrieseberg/iss3383
Stop validation error notification stack
2014-07-30 22:04:31 +01:00
Fabian Becker
29ad30bec8 Fix unhandled exception
no ref
- return result of mail.send
2014-07-30 18:45:00 +00:00
Robert Jackson
7357ece639
Perform a hard refresh upon signout.
Closes #3458.
2014-07-30 14:22:28 -04:00
Fabian Becker
d4fdb07d9c Users API advanced browsing
closes #3085
- active and invited include multiple statuses when fetching
- adjusted data generator
2014-07-30 16:59:27 +00:00