Commit Graph

190 Commits

Author SHA1 Message Date
Ruben van de Ven dc20a7238f Set content type of assets based on name 2020-10-25 12:56:07 +01:00
Ruben van de Ven cf0cd38269 Fix #358 - migrate to S3 policy v4 to support AWS4-HMAC-SHA256 2020-09-04 22:08:38 +02:00
Cassie Tarakajian 2919db4d6a
Merge branch 'develop' into bug/sketch-name-character-limit 2020-08-05 18:19:33 -04:00
Cassie Tarakajian 3aa26120c2 [#1532] Update project when deleting file 2020-08-05 16:43:32 -04:00
Cassie Tarakajian 76bcf9cb09 [#1529] Send status codes, run validator 2020-08-03 16:42:28 -04:00
josephmwells db9a703def Add character limit to sketch name on the back end #568 2020-08-03 11:40:48 -07:00
Cassie Tarakajian 2b3be3accc [#1317] Update and run email consolidation script 2020-07-17 19:09:23 -04:00
Cassie Tarakajian cd5c000d6d [#1317] Update email consolidation script
- Update the emailConsolidation script so that it will de-duplicate the
  first duplicated user
- Sends email to user alerting them that the consolidation has taken
  place.
2020-07-16 19:37:37 -04:00
Cassie Tarakajian f19f52683b Merge branch 'develop' into login-signup-issue 2020-07-16 17:11:05 -04:00
Cassie Tarakajian cc6d868988 [#1500] Update sketch media file duplication code
- Sketch duplication code now checks for AWS endpoint via environment
  variable, rather than hard-coded string
- Fixes `aws.controller#getObjectKey`, which was incorrectly generating
  file keys
2020-07-16 17:00:50 -04:00
Cassie Tarakajian b126a69c11 [#1317] Begin writing duplicate email script 2020-07-16 14:25:02 -04:00
Cassie Tarakajian 6259f58233 [#1314][#1489] Add static methods to user model
- Add new static methods to user model
  - `findByEmailAndUsername`
  - renames `findByMailOrName` to `findByEmailOrUsername`
  - `findByUsername`
  - `findByEmail`
- Reverts case insensitive behavior for username
2020-07-15 17:33:11 -04:00
Cassie Tarakajian 15ad07d5ce [#1314][#1489] Use collation instead of RegEx
- Add case insensitive indexes for User.email and User.username
- Update user queries by username or email so that they are case
  insensitive
2020-07-14 18:16:17 -04:00
Cassie Tarakajian fd06f5ff9a Merge branch 'develop' into login-signup-issue 2020-07-13 16:50:18 -04:00
Cassie Tarakajian 5e0d5226e7
Merge pull request #1480 from andrewn/bugfix/deleted-collection-sketch
Allow deleted sketches in collections to be removed (fixes #1465)
2020-07-06 13:09:42 -04:00
Cassie Tarakajian dc01823602 [#1234] Add header to clear cache for present view 2020-06-29 18:22:55 -04:00
Andrew Nicolaou 0e1bb3bd44 Allow deleted sketches in collections to be removed (fixes #1465) 2020-06-29 11:39:35 +02:00
Cassie Tarakajian 47e798a7e6 Fixes #1409 - adds username to url when fetching sketch from editor API 2020-05-26 17:35:13 -04:00
Cassie Tarakajian e83ac7b587 Merge branch 'master' into login-signup-issue 2020-04-16 17:08:22 -04:00
Cassie Tarakajian ce653ceebb Fixes #850: 503 error when downloading sketch 2020-04-15 17:39:28 -04:00
Cassie Tarakajian ce1628cd69 Fixes #1268 - fix issue with default protocol of https for local development 2020-04-10 18:30:07 -04:00
Cassie Tarakajian 9671cd0687 Fix linting errors 2020-04-06 19:02:55 -04:00
Cassie Tarakajian ef4a8d7ea1 Use MongoDB Regexes to query case insensitive username/password 2020-04-06 19:01:37 -04:00
Cassie Tarakajian 86e299c936 Handle both lowercase and mixedcase username/password 2020-04-06 15:55:00 -04:00
Cassie Tarakajian ba00f7fd89 Merge master 2020-04-06 15:40:52 -04:00
Cassie Tarakajian 416824ad56 Code style changes to use === and comparison to undefined 2020-03-30 17:07:10 -04:00
Mayank Gautam 8754848699 Added safegaurd against invalid project id in the method getFileContent 2020-03-30 16:58:53 -04:00
Cassie Tarakajian f1dd9f44ef
Merge pull request #1340 from processing/feature/public-api
Merge Collections to Master
2020-03-30 16:07:53 -04:00
Elit Altum 06bca997ee
fix(file.controller.js): set headers for file extensions from MIME -I1218 (#1330)
* fix(file.controller.js): set headers for file extensions from MIME - I1218
* Use name to work out content type and provide fallback

Co-authored-by: Andrew Nicolaou <me@andrewnicolaou.co.uk>
2020-03-27 13:00:50 +01:00
shakti97 ba92e01762 Fix username/email case issue in login/signup 2020-03-09 01:39:01 +05:30
Cassie Tarakajian 9de8257464 Fix server-side linting erros 2020-03-03 18:52:39 -05:00
Cassie Tarakajian 59fe175ede Fix merge conflict for cherry picking 11833e9880257fe8164331689f77f8aa11df6a2a 2020-03-03 14:45:02 -05:00
Cassie Tarakajian 0cde29e56d re #168, get asset deletion route to work, update options dropdown on asset list 2020-03-03 14:43:23 -05:00
Cassie Tarakajian 36d20281db add script to add total size to all user accounts, add totalSize to user model, return totalSize from user api request 2020-03-03 14:00:53 -05:00
Cassie Tarakajian 5654ed1922 Merge branch 'master' into feature/public-api 2020-03-03 12:49:32 -05:00
Cassie Tarakajian e776bc0ac0 Upgrade node version to 12.16.1, update Node installatino docs 2020-02-25 17:14:50 -05:00
Andrew Nicolaou 14a8f48fd5 Fix all linting errors/warnings 2019-10-21 10:35:20 +02:00
Andrew Nicolaou 6ca6e78a28 Displays existing collection
- List all collections for a given user
- View an individual collection
- Link to a sketch from a collection
2019-09-25 12:06:07 -04:00
Andrew Nicolaou c9551a3142 Adds Collections model and Editor API to manage collections
- List any user's collections
- Create new collection
- Modify collection metadata
- Delete collection
- Add/remove any project to/from a collection
2019-09-25 12:01:39 -04:00
Cassie Tarakajian 5900e62904 unify navigation for authentication pages, add authorization to front end, fixes #650 2019-09-19 13:38:27 -04:00
Cassie Tarakajian 7f2529a973 merge master 2019-09-11 19:05:15 -04:00
Cassie Tarakajian a155e7638d
re #1153: fix bug in which login form was in invalid state if user had entered username or password incorrectly on the first try (#1155) 2019-09-06 13:30:06 -04:00
Andrew Nicolaou d44a058fd8 Public API: Create new project (fixes #1095) (#1106)
* Converts import script to use public API endpoints

The endpoints don't exist yet, but this is a good way to see how
the implementation of the data structures differ.

* Exposes public API endpoint to fetch user's sketches

* Implements public API delete endpoint

* Adds helper to create custom ApplicationError classes

* Adds create project endpoint that understand API's data structure

This transforms the nested tree of file data into a mongoose
Project model

* Returns '201 Created' to match API spec

* Removes 'CustomError' variable assignment as it shows up in test output

* transformFiles will return file validation errors

* Tests API project controller

* Tests toModel()

* Creates default files if no root-level .html file is provided

* Do not auto-generate a slug if it is provided

Fixes a bug where the slug was auto-generated using the sketch name,
even if a slug property had been provided.

* Validates uniqueness of slugs for projects created by the public API

* Adds tests for slug uniqueness

* Configures node's Promise implementation for mongoose (fixes warnings)

* Moves createProject tests to match controller location

* Adds support for code to ApplicationErrors

* deleteProject controller tests

* getProjectsForUser controller tests

- implements tests
- update apiKey tests to use new User mocks

* Ensure error objects have consistent property names

`message` is used as a high-level description of the errors
`detail` is optional and has an plain language explanation of the
individual errors
`errors` is an array of each individual problem from `detail` in a
machine-readable format

* Assert environment variables are provided at script start

* Version public API

* Expect "files" property to always be provided

* Fixes linting error

* Converts import script to use public API endpoints

The endpoints don't exist yet, but this is a good way to see how
the implementation of the data structures differ.

* Exposes public API endpoint to fetch user's sketches

* Implements public API delete endpoint

* Adds helper to create custom ApplicationError classes

* Adds create project endpoint that understand API's data structure

This transforms the nested tree of file data into a mongoose
Project model

* Returns '201 Created' to match API spec

* Removes 'CustomError' variable assignment as it shows up in test output

* transformFiles will return file validation errors

* Tests API project controller

* Tests toModel()

* Creates default files if no root-level .html file is provided

* Do not auto-generate a slug if it is provided

Fixes a bug where the slug was auto-generated using the sketch name,
even if a slug property had been provided.

* Validates uniqueness of slugs for projects created by the public API

* Adds tests for slug uniqueness

* Configures node's Promise implementation for mongoose (fixes warnings)

* Moves createProject tests to match controller location

* deleteProject controller tests

* Adds support for code to ApplicationErrors

* getProjectsForUser controller tests

- implements tests
- update apiKey tests to use new User mocks

* Ensure error objects have consistent property names

`message` is used as a high-level description of the errors
`detail` is optional and has an plain language explanation of the
individual errors
`errors` is an array of each individual problem from `detail` in a
machine-readable format

* Assert environment variables are provided at script start

* Version public API

* Expect "files" property to always be provided

* Fixes linting error

* Checks that authenticated user has permission to create under this namespace

Previously, the project was always created under the authenticated user's
namespace, but this not obvious behaviour.
2019-08-30 14:26:57 -04:00
Cassie Tarakajian d64498ef1f
RE #168, Feature/asset totalsize limit (#1123)
* re #168, add totalsize to response from API, add loader to asset list, add totalsize to asset list ui

* re #168, add totalsize to response from API, add loader to asset list, add totalsize to asset list ui

* update asset list copy to remove limit, since that's not implemented yet
2019-07-24 12:55:58 -04:00
Cassie Tarakajian f6416738ae Bug/orphaned assets (#1108)
* fixes #498

* fix linting errors
2019-07-22 16:09:11 -04:00
Laksh Singla c3856480b8 Update sketch list styling (#819)
* parent b3c3efcec9
author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530
committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540243 -0400

parent b3c3efcec9
author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530
committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540198 -0400

parent b3c3efcec9
author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530
committer Cassie Tarakajian <ctarakajian@gmail.com> 1560539667 -0400

Created initial html structure and styling for new SketchList design

Final styling of ActionDialogueBox commplete

Dropdown menu disappearing while clicking anywhere on the table

Fixed linting issues and renamed variables

Minor tweaks in the SketchList dropdown dialogue UI

Themifyed the dropdown

Made changes in the dropdown: Arrow positioned slightly updwards, Removed blank space and added box-shadow in dropdown, themifyed dropdowns dashed border color

Added Delete and Share functionality to Dialog box

Added Duplicate functionality to Dialog box

Added download functionality to Dialog box

SketchList does not open a sketch if dialogue box is opened

SketchList Rename initial UI completed

Enter key handled for rename project option

[WIP] Updating rename functionality

Download option now working for all the sketches

Duplicate functionality extended for non opened sketches too

Modified overlay behaviour to close only the last overlay

Share modal can now display different projects

Dropdown closes when Share and Delete are closing for a more natural UX

fix broken files from rebasing

Created initial html structure and styling for new SketchList design

Final styling of ActionDialogueBox commplete

Added Delete and Share functionality to Dialog box

Added Duplicate functionality to Dialog box

[WIP] Updating rename functionality

Duplicate functionality extended for non opened sketches too

Modified overlay behaviour to close only the last overlay

Share modal can now display different projects

Final styling of ActionDialogueBox commplete

Fixed linting issues and renamed variables

Minor tweaks in the SketchList dropdown dialogue UI

Themifyed the dropdown

Added Delete and Share functionality to Dialog box

[WIP] Updating rename functionality

Modified overlay behaviour to close only the last overlay

Share modal can now display different projects

Dropdown closes when Share and Delete are closing for a more natural UX

fix broken files from rebasing

Final styling of ActionDialogueBox commplete

Minor tweaks in the SketchList dropdown dialogue UI

Themifyed the dropdown

[WIP] Updating rename functionality

Duplicate functionality extended for non opened sketches too

Modified overlay behaviour to close only the last overlay

Share modal can now display different projects

Dropdown closes when Share and Delete are closing for a more natural UX

* fix bugs in merge commit

* move sketch list dialogue to ul/li

* update sketch option dropdown to use dropdown placeholder, remove unused css

* major refactor of sketchlist component, fix showShareModal action, minor updates ot icon sizing

* fix broken links on asset list

* remove unused image, fix options for different users in sketch list
2019-07-22 16:09:11 -04:00
Cassie Tarakajian cdf1585b72
Bug/orphaned assets (#1108)
* fixes #498

* fix linting errors
2019-06-19 17:03:15 -04:00
Laksh Singla 735adcfa05 Update sketch list styling (#819)
* parent b3c3efcec9
author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530
committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540243 -0400

parent b3c3efcec9
author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530
committer Cassie Tarakajian <ctarakajian@gmail.com> 1560540198 -0400

parent b3c3efcec9
author Laksh Singla <lakshsingla@gmail.com> 1549106083 +0530
committer Cassie Tarakajian <ctarakajian@gmail.com> 1560539667 -0400

Created initial html structure and styling for new SketchList design

Final styling of ActionDialogueBox commplete

Dropdown menu disappearing while clicking anywhere on the table

Fixed linting issues and renamed variables

Minor tweaks in the SketchList dropdown dialogue UI

Themifyed the dropdown

Made changes in the dropdown: Arrow positioned slightly updwards, Removed blank space and added box-shadow in dropdown, themifyed dropdowns dashed border color

Added Delete and Share functionality to Dialog box

Added Duplicate functionality to Dialog box

Added download functionality to Dialog box

SketchList does not open a sketch if dialogue box is opened

SketchList Rename initial UI completed

Enter key handled for rename project option

[WIP] Updating rename functionality

Download option now working for all the sketches

Duplicate functionality extended for non opened sketches too

Modified overlay behaviour to close only the last overlay

Share modal can now display different projects

Dropdown closes when Share and Delete are closing for a more natural UX

fix broken files from rebasing

Created initial html structure and styling for new SketchList design

Final styling of ActionDialogueBox commplete

Added Delete and Share functionality to Dialog box

Added Duplicate functionality to Dialog box

[WIP] Updating rename functionality

Duplicate functionality extended for non opened sketches too

Modified overlay behaviour to close only the last overlay

Share modal can now display different projects

Final styling of ActionDialogueBox commplete

Fixed linting issues and renamed variables

Minor tweaks in the SketchList dropdown dialogue UI

Themifyed the dropdown

Added Delete and Share functionality to Dialog box

[WIP] Updating rename functionality

Modified overlay behaviour to close only the last overlay

Share modal can now display different projects

Dropdown closes when Share and Delete are closing for a more natural UX

fix broken files from rebasing

Final styling of ActionDialogueBox commplete

Minor tweaks in the SketchList dropdown dialogue UI

Themifyed the dropdown

[WIP] Updating rename functionality

Duplicate functionality extended for non opened sketches too

Modified overlay behaviour to close only the last overlay

Share modal can now display different projects

Dropdown closes when Share and Delete are closing for a more natural UX

* fix bugs in merge commit

* move sketch list dialogue to ul/li

* update sketch option dropdown to use dropdown placeholder, remove unused css

* major refactor of sketchlist component, fix showShareModal action, minor updates ot icon sizing

* fix broken links on asset list

* remove unused image, fix options for different users in sketch list
2019-06-19 16:21:25 -04:00
Andrew Nicolaou d6438aa3b2 Merge branch 'master' into feature/public-api 2019-06-12 12:03:22 +02:00
Andrew Nicolaou d2cad7438e
Test create project server code (prep for #1095)
* upgrades jest to latest version

* tests Project model with mockingoose

* extracts createProject controller to own file

* tests createProject controller with sinon-mongoose
2019-06-12 11:27:28 +02:00