Commit graph

589 commits

Author SHA1 Message Date
James Allen
76af5e5563 Don't call deprecated findPopulatedById in loadEditor 2016-03-08 14:20:00 +00:00
James Allen
359689ffea find -> findOne 2016-03-08 14:19:38 +00:00
James Allen
0882eb2a99 Don't use deprecated Project.findPopulatedById in ReferencesManager 2016-03-08 14:05:56 +00:00
James Allen
40048d49a2 Fix unit test 2016-03-08 12:07:42 +00:00
James Allen
5f5445f625 Use TpdsUpdateSender to use CollaboratorsHandler 2016-03-08 11:54:45 +00:00
James Allen
a50bdaf5cc Refactor LimitationsManager to use CollaboratorsHandler 2016-03-07 15:32:04 +00:00
James Allen
bedc8a0492 Remove ProjectGetter.populateProjectWithUsers 2016-03-07 15:25:10 +00:00
James Allen
2ba2b72fd1 Refactor ProjectDeleter to use CollaboratorHandler 2016-03-07 12:27:40 +00:00
James Allen
6d93076d51 Refactor getCollaborators http method to use CollaboratorsHandler 2016-03-07 12:02:48 +00:00
James Allen
1a689aa1fd Move findAllUsersProjects from Project to ProjectGetter 2016-03-03 17:19:03 +00:00
James Allen
120a142733 Add in required abstracted functions to CollaboratorsHandler 2016-03-03 16:13:19 +00:00
Henry Oswald
39c7010d72 fixed broken tests 2016-02-29 22:51:46 +00:00
Henry Oswald
76591ebb23 made ProjectGetter.getProject more robust
it can deal with multiple types of query better, including mongoose ids which are not being matched like mongojs ids.
2016-02-29 19:01:46 +00:00
Henry Oswald
6a7395a287 brought back the project_or_id style
Added functionality into project getter, its a big performance improvement for things like cloning projects. Clone a 500 element project, 1 mongo get or 500.
2016-02-29 17:34:38 +00:00
Henry Oswald
b5dd96aa71 fixed some mongo calls in project entity handler
need to specify fields you want to not get array back.
2016-02-29 16:03:22 +00:00
Henry Oswald
8f0d1dc73e add in the calls to block large projects 2016-02-29 13:05:17 +00:00
Henry Oswald
8aec86af4e moved count element to project entity handler and added tests 2016-02-26 13:25:09 +00:00
Henry Oswald
eedaa43b58 move project duplicator to mongojs 2016-02-26 08:32:00 +00:00
Henry Oswald
6ca69f88ac Move project locator to mongojs 2016-02-26 08:31:47 +00:00
Henry Oswald
586d4cbae1 replaced all mongoose Project.find with mongojs calls 2016-02-26 08:23:43 +00:00
Henry Oswald
b6d62a677b ProjectDeleter.archiveProject doesn't need to get entire project 2016-02-26 08:13:41 +00:00
Henry Oswald
447568aa91 ProjectDetailsHandler.getDetails does not need full project 2016-02-26 07:56:26 +00:00
Henry Oswald
43102e0ffc lowercase and trim add user to group email address 2016-02-25 14:15:56 +00:00
James Allen
155831c3e7 Skip top-level directory if it exists in zip upload 2016-02-24 17:21:20 +00:00
James Allen
c6dcb64b18 Overwrite text files from uploads 2016-02-24 16:37:03 +00:00
Henry Oswald
09ac8f8c7a move .putElement into ProjectEntityHandler with tests 2016-02-24 15:36:39 +00:00
Henry Oswald
7a28eeeaa0 ProjectEntityHandler.addFolder take only project id and
only gets project folder structure
2016-02-23 15:45:40 +00:00
Henry Oswald
2a6e09a41b remove console.log 2016-02-23 15:37:23 +00:00
Henry Oswald
1278081b51 mkdirp only needs folder strucutre 2016-02-23 15:36:59 +00:00
Henry Oswald
1d76850ebd copyFileFromExistingProject does not need the whole project 2016-02-23 15:34:31 +00:00
Henry Oswald
b504732733 fixed calls to addUserToGroup and added more logging 2016-02-22 16:50:41 +00:00
Shane Kilkelly
b505f0d455 Merge branch 'sk-references-search'
Conflicts:
	app/coffee/Features/References/ReferencesController.coffee
2016-02-19 11:30:55 +00:00
Henry Oswald
29e4b324fd improve calls for invite notifications and auto mark as read 2016-02-18 11:43:43 +00:00
Henry Oswald
f824a3e28a kill off dead code in group handler 2016-02-18 11:42:26 +00:00
Henry Oswald
bd54cc722a fixed broken tests in AuthenticationController 2016-02-18 10:16:50 +00:00
Henry Oswald
fc4bd94a6e don't create notification if user is already part of group 2016-02-18 10:06:21 +00:00
Henry Oswald
735f7bd51e change res.send to res.sendStatus for new express 2016-02-16 12:38:27 +00:00
Henry Oswald
5c5888b5dc Merge branch 'pr/221' 2016-02-11 11:44:45 +00:00
Shane Kilkelly
326d9e59f8 Refactor ReferencesSearch* to just References*. 2016-02-08 17:04:27 +00:00
Henry Oswald
de0589b051 added notifications calls for sending to api and mark as read
not creating it yet
2016-02-05 14:13:38 +00:00
James Allen
6143b2218c Send user_id on Dropbox requests through to doc updater 2016-02-04 14:27:00 +00:00
Henry Oswald
7994528c92 make site licence regex more specific 2016-02-03 16:08:29 +00:00
James Allen
4c626f23e7 Merge pull request #224 from sharelatex/ja_draft_mode
Draft mode for compiles
2016-02-02 15:04:21 +00:00
James Allen
425a9b9db2 Add in option to compile in draft mode 2016-02-02 14:50:48 +00:00
Henry Oswald
aaa258099e added tests to check rate limiter works without session 2016-02-02 14:26:23 +00:00
James Allen
b32178182d Explicitly create tags and get their id 2016-02-01 10:18:56 +00:00
James Allen
77cc6af35e Update add tag end point to use tag_id 2016-02-01 10:18:56 +00:00
James Allen
f1e65cc776 Use tag_id for deleting tags from project 2016-02-01 10:18:56 +00:00
James Allen
1bd5aef85f Allow renaming of tags 2016-02-01 10:18:56 +00:00
James Allen
1a86e69d1f Allow tags to be deleted 2016-02-01 10:18:56 +00:00
Shane Kilkelly
50a451970b Merge branch 'master' into sk-references-2 2016-01-28 10:06:41 +00:00
Shane Kilkelly
3a700a5af2 More tests for indexAll 2016-01-27 16:03:40 +00:00
Shane Kilkelly
cc818695ef Split References.index into index and indexAll. 2016-01-27 16:00:53 +00:00
Shane Kilkelly
ec8a12d445 Flush changes to mongo before sending request to references service 2016-01-27 13:33:42 +00:00
Shane Kilkelly
fed10280ab Use docstore url rather than going through web api. 2016-01-27 09:58:54 +00:00
Shane Kilkelly
d1e53f0cb8 Test ReferencesSearchHandler.index 2016-01-26 16:14:17 +00:00
Shane Kilkelly
8a991b0d06 Start testing ReferencesSearch feature 2016-01-26 14:29:23 +00:00
Henry Oswald
690b195f1a move login success to .json as it sends json over 2016-01-25 17:35:57 +00:00
Henrique Santos
9429e49cf8 finishing frontend 2016-01-22 18:08:39 -02:00
Shane Kilkelly
af75bb8a60 wip: change how indexing of references works. 2016-01-22 14:23:59 +00:00
Henrique Santos
2d11705837 fix issues in first commit 2016-01-22 03:41:22 -02:00
Henrique Santos
476eaa8b84 add notification backend and unit test
add notification init frontend
2016-01-21 18:42:50 -02:00
Shane Kilkelly
d5d5ba9066 Merge branch 'master' of github.com:sharelatex/web-sharelatex 2016-01-20 14:02:24 +00:00
Shane Kilkelly
6cc18cd2fb Add test. 2016-01-20 14:02:14 +00:00
Shane Kilkelly
0b28e7e964 send a fullIndex flag along to references service. 2016-01-20 13:53:28 +00:00
James Allen
ed5872702a Pass image to wordcount end point in CLSI 2016-01-19 14:17:01 +00:00
Shane Kilkelly
2a7894f6e4 Merge branch 'master' of github.com:sharelatex/web-sharelatex 2016-01-15 14:41:12 +00:00
James Allen
03d75944b0 Allow image name to be configured 2016-01-15 10:26:36 +00:00
Shane Kilkelly
ca0a625dcc Begin work on indexing the references when project is opened. 2016-01-14 14:53:08 +00:00
Shane Kilkelly
a63028bad3 Test the ReferencesSearchHandler 2015-12-31 10:28:19 +00:00
Shane Kilkelly
9280dd240b Test getKeys. 2015-12-31 09:39:48 +00:00
Shane Kilkelly
d9ca9fc06d Fix comically long lines. 2015-12-31 09:22:35 +00:00
Shane Kilkelly
877ea1d376 Test remaining failure cases. 2015-12-30 16:20:14 +00:00
Shane Kilkelly
ffb149b923 Test failure conditions. 2015-12-30 16:15:31 +00:00
Shane Kilkelly
5d80ce9ca5 More tests. 2015-12-30 15:24:57 +00:00
Shane Kilkelly
86d69f3275 Start testing ReferencesSearch. 2015-12-30 15:08:12 +00:00
Henry Oswald
501763bb4e changed add doc to use ligher mongo call (folders only) 2015-12-15 13:27:41 +00:00
Henry Oswald
763f16f43c Merge branch 'master' of https://github.com/sharelatex/web-sharelatex 2015-12-12 11:39:54 +00:00
James Allen
e8f21986dd Refactor registration so it can be called from modules 2015-12-11 17:11:20 +00:00
James Allen
1e8ab5357b Improve pre-registered account activation process 2015-12-11 11:30:06 +00:00
Henry Oswald
13af9b7b56 find project by name should only find active projects 2015-12-10 17:06:00 +00:00
Henry Oswald
5213be4fe9 Merge branch 'master' of https://github.com/sharelatex/web-sharelatex 2015-11-25 11:54:40 +00:00
Henry Oswald
91a84cb232 increase compile throttle limit 2015-11-25 11:07:53 +00:00
Henry Oswald
ba58509a67 increased length rate limit is in effect for 2015-11-16 12:21:06 +00:00
Henry Oswald
4e8eebb482 increase rate limit threshold on pdf downloads 2015-11-11 09:00:38 +00:00
Henry Oswald
16670cb3e3 only rate limit full pdf downloads 2015-11-10 16:23:55 +00:00
Henry Oswald
23fd12c67d dropped throttle for full pdf download to 30 over 5 mins
1 download every 10 seconds which seems ample
2015-11-10 11:53:11 +00:00
Henry Oswald
c8ba7b72ab Merge branch 'master' of https://github.com/sharelatex/web-sharelatex 2015-11-10 10:36:06 +00:00
James Allen
16b7bf222a Merge branch 'contacts' 2015-11-05 10:14:25 +00:00
James Allen
c46f62cfc1 Ensure that a user can only be added to project once 2015-11-02 15:21:41 +00:00
Henry Oswald
cf48c94725 rate limit pdf downloads 2015-10-30 11:56:01 +00:00
Henry Oswald
1c91de0395 added function to get project with only folders for quicker adding of files to large projects 2015-10-21 16:56:06 +01:00
Henry Oswald
d9734953a6 don't archive project in track changes for moment 2015-10-20 17:36:37 +01:00
Henry Oswald
a94a03fc3e added missing stubbed module call breaking tests 2015-10-19 15:48:59 +01:00
Henry Oswald
2c32126f68 archive in track changes as well as docstore 2015-10-19 15:44:50 +01:00
James Allen
d996ed6e47 Refactor addUserToProject for better access by groups 2015-10-14 17:29:58 +01:00
James Allen
c4e4f2c77a Add modules hook for contacts and support groups in auto complete 2015-10-08 18:17:53 +01:00
James Allen
78c5741d06 Add contact when adding collaborator 2015-10-08 16:42:23 +01:00
James Allen
d11d536994 Refactor adding and removing collaborators to not go through EditorController 2015-10-08 14:15:36 +01:00
James Allen
8cc7869b03 Pull in contacts from contacts api and send to tag-input for autocomplete 2015-10-07 17:32:35 +01:00
Henry Oswald
f1d07811df update the entire users features on assign bonus bu don't update
the user features if there is nothing to update when assigning bonus
2015-10-07 13:50:51 +01:00
Henry Oswald
b69ec9768d bonus allocater does not need to check if user has subscription any more. 2015-10-05 16:50:34 +01:00
Henry Oswald
fae7d431f4 after subscription is updated always check bonus 2015-10-05 16:33:13 +01:00
Henry Oswald
9a60617162 change referral allocated to only upgrade features and to find highest level
i.e. user has referred 5 users, there are bonus levels for 3 & 6 shares, auto takes 3 users now.
2015-10-05 12:30:03 +01:00
Henry Oswald
5ffd76c670 Merge branch 'master' of https://github.com/sharelatex/web-sharelatex 2015-09-14 15:36:08 +01:00
Henrique Dias
3be0425b45 add unit tests for wordcount 2015-09-11 10:21:05 -03:00
James Allen
639424f664 Don't error on project clone if not root doc is set 2015-09-02 14:32:21 +01:00
Shane Kilkelly
0aaeb6671e Keep password reset token in session, and strip it from reset page url.
This fixes an issue where the reset token was leaked in the referrer header
when navigating away from the password reset page to an external site.

Now we get the token from the query string, store it in the session,
then redirect to the bare url of the password reset page, which then
uses the stored token to render the reset form.
2015-08-24 11:53:33 +01:00
Shane Kilkelly
23bd5d317c A few extra cases which should not be treated as html. 2015-08-20 15:58:36 +01:00
Shane Kilkelly
ebf754904f More thorough tests for the FileStoreController when downloading .html files. 2015-08-20 15:56:56 +01:00
Shane Kilkelly
85c1704fc5 Test that content-type is set for mobile-safari user-agents. 2015-08-20 14:03:12 +01:00
Shane Kilkelly
ce248f56d7 Un-break FileStoreControllerTests by mocking out the req.get method. 2015-08-20 12:28:51 +01:00
Henry Oswald
0e9ec00f85 added stubbed logger in document controller tests 2015-08-19 11:58:59 +01:00
Henry Oswald
63580f6a79 remove useClsi2 flag in project collection 2015-08-19 11:58:41 +01:00
Henry Oswald
50fc886c94 changed inactive to active as its more effienct query in mongo 2015-08-19 11:54:30 +01:00
Henry Oswald
70b825fd2a fixed call to ProjectUpdateHandler.markAsOpened and made it async 2015-08-14 11:27:11 +01:00
Henry Oswald
68e970cd69 Merge branch 'master' of https://github.com/sharelatex/web-sharelatex 2015-08-14 09:31:25 +01:00
Henry Oswald
a0142d4415 added inactive and reactivate project logic 2015-08-13 22:40:28 +01:00
Henry Oswald
3ecf201eda send -> sendStatus 2015-07-08 16:56:38 +01:00
Henry Oswald
8020cd8f47 removed tpds from settings.defaults.coffee, if not set updates are now not queued 2015-07-02 12:09:08 +01:00
Henry Oswald
7fd29b18a8 destroy users session before creating a new one for them after login
session changed to prevent against fixation attacks
2015-07-01 15:29:02 +01:00
Henry Oswald
4f0b922a5d changed name used when project or file uploaded, this changed when
we started using https://github.com/expressjs/multer

* originalname - Name of the file on the user's computer
* name - Renamed file name
2015-07-01 15:28:49 +01:00
Henry Oswald
15a57f5dc4 removed req.session.destorys from endpoints now on the api router which are not needed 2015-07-01 15:26:05 +01:00
Henry Oswald
2ec925b45e fairy removed from web, makes http request to tpds worker now 2015-06-22 22:33:04 +01:00
Henry Oswald
33aa5c732f if a domain licence link has expired render a nice message explaining they need to retry 2015-06-01 12:43:42 +01:00
Henry Oswald
d3f6c0c614 Merge branch 'user-csv' of git://github.com/heukirne/web-sharelatex into heukirne-user-csv 2015-05-29 12:17:54 +01:00
Henry Oswald
e4011b9ba1 Merge branch 'emailverification' 2015-05-29 12:10:02 +01:00
Henrique Dias
f709ddf3eb add csv export unit tests 2015-05-28 17:22:49 -03:00
Henry Oswald
43c4531e51 kill off CollaboratorsHandler. changeUsersPrivilegeLevel as it is not used anywhere 2015-05-28 13:02:08 +01:00
Henry Oswald
b657c5207e cleaned up the views a bit 2015-05-27 21:45:29 +01:00
Henry Oswald
22b94e9246 renamed SubscriptionDomainAllocator -> SubscriptionDomainHandler 2015-05-27 20:57:54 +01:00
Henry Oswald
4773d6d22f added tests around new endpoints for joining groups 2015-05-27 20:50:16 +01:00
Henry Oswald
f27c072ae1 pull logic checking if user is already part of a group out of controller into handler 2015-05-27 16:33:47 +01:00
Henry Oswald
72e528e9d1 if you are alread in the group show the custom group page 2015-05-27 15:50:28 +01:00
Henry Oswald
79fa49a43d if a user is elelable to be part of a group subscription and they go to
/user/subscription it should redirect them to the group subscription invite
2015-05-27 15:35:31 +01:00
Henry Oswald
841231dbf8 make PasswordResetTokenHandler generic so it can be used for invites 2015-05-26 15:24:09 +01:00
Brian Gough
e51cdb81bd port leak fixes from smoke-test-sharelatex module 2015-05-26 10:54:55 +01:00
Brian Gough
cc9c8fdc94 freeze Date in Recurly tests before all calls
beforeEach freezes and resets for each subtest, which does not give
the desired result as the time increases between each subtest, we want
to freeze once at the beginning and reset at the end using before/after.
2015-05-19 15:00:30 +01:00
Henry Oswald
f5c39efcac patched xss hole with messages not setting the content type correctly 2015-05-19 11:04:52 +01:00
Brian Gough
3051d7dab6 modify LockManager test to avoid dependence on timing 2015-05-18 09:14:28 +01:00
Henry Oswald
9764ab258b added complex password validation to password resets 2015-04-30 12:05:46 +01:00
Henry Oswald
a7640b5bbd changed authentication controller to use req.parsedUrl.pathname as query strings on req.url were breaking the whitelist 2015-04-30 11:57:40 +01:00
Henry Oswald
6669884f44 Merge branch 'tpds-cleanup' 2015-04-23 10:06:26 +01:00
Henry Oswald
7a46b98c82 fixed unit tests for deleting files sent from tpds 2015-04-22 15:08:29 +01:00
James Allen
5c30a7de67 Add in option for global login requirement (defaults to on) 2015-04-15 11:14:53 +01:00
James Allen
893ff85521 Don't allow password resets for holding accounts 2015-04-14 13:11:49 +01:00
James Allen
185514ea35 Fix failing unit test 2015-03-19 16:41:09 +00:00
James Allen
9b8cf7bcfa Remove public registration and require that a user be registered by an admin 2015-03-19 14:22:48 +00:00
James Allen
93a088618a Return proper error from registration handler 2015-03-18 16:19:48 +00:00
James Allen
cb948fede2 Move email sending into registration controller 2015-03-18 15:57:01 +00:00