1020 Commits

Author SHA1 Message Date
Tom Moor
9338a54fe0
feat: Separate title from body (#1216)
* first pass at updating all Time components each second

* fix a couple date variable typos

* use class style state management instead of hooks

* wip: Separate title from body

* address feedback

* test: Remove unused test

* feat: You in publishing info language
fix: Removal of secondary headings

* After much deliberation… a migration is needed for this to be reliable

* fix: Export to work with new title structure

* fix: Untitled

* fix: Consistent spacing of first editor node

* fix: Emoji in title handling

* fix: Time component not updating for new props

* chore: Add createdAt case

* fix: Conflict after merging new TOC

* PR feedback

* lint

* fix: Heading level adjustment

Co-authored-by: Taylor Lapeyre <taylorlapeyre@gmail.com>
2020-04-05 15:07:34 -07:00
Tom Moor
3bd1c1f047 fix: Doc history does not load when linked to directly (race condition) 2020-04-05 13:20:47 -07:00
Tom Moor
09dea295a2
fix: Cleanup S3 Attachments (#1217)
* fix: Server error if attempting to load an unknown attachment

* fix: Migration should cascade delete to document attachments

* fix: Delete S3 attachments along with documents
2020-03-28 15:56:01 -07:00
Tom Moor
5db43f2607 lint 2020-03-23 22:26:17 -07:00
Tom Moor
4b3ddf8769
fix: Account for no text param passed to hooks.slack
This will never happen in production, Slack always provides the param but prevents a possible 500 server error when messing with the API manually.
2020-03-22 16:41:15 -07:00
Tom Moor
f0be9beeb4
feat: Ensure that editorVersion is saved with document/revisions (#1212) 2020-03-16 08:30:23 -07:00
Tom Moor
4851f51d8b
docs: Add documentation for groups API endpoints (#1211)
* docs: Add documentation for groups API endpoints
fix: Remove useless permission query param

* restore permission filter on collections.group_memberships

* tweak language
2020-03-16 08:30:15 -07:00
David Miranda
e611979a8d
Absolute routes won't work when users have subdomains (#1208) 2020-03-15 21:04:46 -07:00
Nan Yu
142303b3de
feat: Add groups and group permissions (#1204)
* WIP - got one API test to pass yay

* adds group update endpoint

* added group policies

* adds groups.list API

* adds groups.info

* remove comment

* WIP

* tests for delete

* adds group membership list

* adds tests for groups list

* add and remove user endpoints for group

* ask some questions

* fix up some issues around primary keys

* remove export from group permissions

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* remove random file

* only create events on actual updates, add tests to ensure

* adds uniqueness validation to group name

* throw validation errors on model and let it pass through the controller

* fix linting

* WIP

* WIP

* WIP

* WIP

* WIP basic edit and delete

* basic CRUD for groups and memberships in place

* got member counts working

* add member count and limit the number of users sent over teh wire to 6

* factor avatar with AvatarWithPresence into its own class

* wip

* WIP avatars in group lists

* WIP collection groups

* add and remove group endpoints

* wip add collection groups

* wip get group adding to collections to work

* wip get updating collection group memberships to work

* wip get new group modal working

* add tests for collection index

* include collection groups in the withmemberships scope

* tie permissions to group memberships

* remove unused import

* Update app/components/GroupListItem.js

update title copy

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/migrations/20191211044318-create-groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/CollectionMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/models/Group.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* minor fixes

* Update app/scenes/CollectionMembers/AddGroupsToCollection.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/menus/GroupMenu.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/Collection.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/CollectionMembers/CollectionMembers.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/GroupNew.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/GroupNew.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/Settings/Groups.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update server/api/documents.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* Update app/scenes/CollectionMembers/components/CollectionGroupMemberListItem.js

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* address comments

* WIP - getting websocket stuff up and running

* socket event for group deletion

* wrapped up cascading deletes

* lint

* flow

* fix: UI feedback

* fix: Facepile size

* fix: Lots of missing await's

* Allow clicking facepile on group list item to open members

* remove unused route push, grammar

* fix: Remove bad analytics events
feat: Add group events to audit log

* collection. -> collections.

* Add groups to entity websocket events (sync create/update/delete) between clients

* fix: Users should not be able to see groups they are not a member of

* fix: Not caching errors in UI when changing group memberships

* fix: Hide unusable UI

* test

* fix: Tweak language

* feat: Automatically open 'add member' modal after creating group

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-03-14 20:48:32 -07:00
Tom Moor
dac2d43f55
dashboard -> home (#1194) 2020-02-26 21:10:20 -08:00
Tom Moor
d06ec5ce0c
fix: Nested document menu item appears where it shouldnt (#1193) 2020-02-26 21:10:10 -08:00
Tom Moor
0b86714984
fix: Newly created private collections do not return correct policies (#1188)
closes #1185
2020-02-24 23:16:24 -08:00
Tom Moor
902e7a4772 fix: Handle private attachments without documentId (migration process) 2020-02-17 09:38:34 -08:00
Tom Moor
3b0b37628e fix: document.updated slack service hook 2020-02-17 09:29:48 -08:00
Tom Moor
c973436870 chore: Disable Sentry breadcrumbs 2020-02-17 08:15:46 -08:00
Tom Moor
41fb2826b3 fix: Sentry CSP 2020-02-16 23:45:00 -08:00
Tom Moor
c15cbd06a4
chore: Bugsnag -> Sentry (#1178)
* Bugsnag -> Sentry

* fix: Import style
2020-02-16 22:58:50 -08:00
Tom Moor
8fbd4a7463 fix: Tweak branding, OSS landing page 2020-02-16 19:49:24 -08:00
Tom Moor
e18d0fdc77 fix: import 2020-02-16 19:27:40 -08:00
Tom Moor
5a20f6322f remove changelog from OSS 2020-02-16 19:25:12 -08:00
Tom Moor
71ed0844b9 fix: Pass github authorization via header instead of query string 2020-02-12 21:12:14 -08:00
Tom Moor
394be7ba74 fix: remove unused files 2020-02-12 21:12:00 -08:00
Tom Moor
8225a924c1 fix: CSP for development AWS assets 2020-02-12 19:42:29 -08:00
Huss
8e2b19dc7a
feat: private content (#1137)
* save images as private and serve via signed url from images.info api

* download private images to directory on export

* fix lint errors

* private s3 default, AWS.s3 module level scope, default s3 url expiry

* combine regex to one, and only replace when there are matches

* fix lint

* code not needed anymore, remove

* updates after pulling master

* revert the uploadToS3FromUrl url return

* use model gettr to compact code, rename to attachments api

* basic checking of document read permission to allow attachment viewing

* fix: Continue to upload avatars as public
fix: Allow redirect for non-private attachments

* add support for publicly shared documents

* catch errors which crash the app during zip export and user creation

* add tests

* enable AWS signature v4 for s3

* switch to use factories to build models for testing

* add isDocker flag for local serving of attachment redirect url

* fix redirect tests

Co-authored-by: Tom Moor <tom.moor@gmail.com>
2020-02-12 19:40:44 -08:00
Tom Moor
064d8cea44 fix #1174 – Allow _~ in url slugs 2020-02-12 09:14:42 -08:00
Tom Moor
8e5a5a57a9
feat: Store image uploads as attachments in database (#1144)
* First pass

* Documentation

* Added optional documentId relationship

* name -> key

* cleanup: No need for separate documentId prop
2020-01-16 09:42:42 -08:00
Tom Moor
5b78cb8963
perf: Reuse redis connections where possible (#1157)
* reuse redis connections where possible

* redis -> ioredis
2020-01-13 18:17:41 -08:00
Tom Moor
e38f4996ae
feat: Return view model from views.create (#1153)
* feat: Return view model from views.create
Towards #1152

* fix: presenter data
2020-01-11 13:46:13 -08:00
Tom Moor
0ccbc6126b
fix: Drafts appear in document insert search (#1148)
* fix: Drafts appear in document insert search

* test
2020-01-05 17:24:57 -08:00
Tom Moor
9c66a14fec fix: API key create/delete should create audit events
closes #1101
2020-01-02 22:20:13 -08:00
Tom Moor
146e4da73b
feat: Document presence indicator (#1114)
* Update websockets to allow joining document-based rooms

* dynamic websocket joining

* emit user.join/leave events when entering and exiting document rooms

* presence storage

* feat: frontend presence store

* lint

* UI updates

* First pass editing state

* refactoring

* Timeout per user/doc
lint

* Document data loading refactor to keep Socket mounted

* restore: Mark as viewed functionality
Add display of 'you' to collaborators

* fix: Socket/document remount when document slug changes due to title change

* Revert unneccessary package update

* Move editing ping interval to a shared constant

* fix: Flash of sidebar when loading page directly on editing mode

* separate document and revision loading

* add comments for socket events

* fix: Socket events getting bound multiple times on reconnect

* fix: Clear client side presence state on disconnect

* fix: Don't ignore server side error
Improved documentation

* More comments / why comments

* rename Socket -> SocketPresence

* fix: Handle redis is down
remove unneccessary join

* fix: PR feedback
2020-01-02 21:17:59 -08:00
Tom Moor
93e4ad8c5e
fix: Account for migrations ran on old versions of Sequelize (#1130) 2019-12-30 22:35:29 -08:00
Tom Moor
98dda567c2
fix: User records not written correctly on signin (#1119)
* Initial fix for #1116

* clarify logic
2019-12-22 20:14:06 -08:00
Tom Moor
d995f27736 feat: Add parentDocumentId option to documents.list endpoint 2019-12-22 17:06:29 -08:00
Tom Moor
6bf2069fa7
fixes #1115 (#1118) 2019-12-22 14:54:12 -08:00
Tom Moor
adf323713e
fix: Documentation spelling 2019-12-18 21:02:32 -08:00
Tom Moor
293c3b7b9c
fix: Move references spacing directly below content (#1113)
* fix: Move references spacing directly below content

* Child document -> Nested document
2019-12-18 21:00:36 -08:00
Tom Moor
89b87c5268
fix: Emails should be stored and processed in lowercase (#1109) 2019-12-17 19:44:50 -08:00
Tom Moor
671fa9cc84 fix: Para floating on signin page when guest signin not enabled 2019-12-15 20:59:36 -08:00
Tom Moor
6d8216c54e
feat: Guest email authentication (#1088)
* feat: API endpoints for email signin

* fix: After testing

* Initial signin flow working

* move shared middleware

* feat: Add guest signin toggle, obey on endpoints

* feat: Basic email signin when enabled

* Improve guest signin email
Disable double signin with JWT

* fix: Simple rate limiting

* create placeholder users in db

* fix: Give invited users default avatar
add invited users to people settings

* test

* add transaction

* tmp: test CI

* derp

* md5

* urgh

* again

* test: pass

* test

* fix: Remove usage of data values

* guest signin page

* Visually separator 'Invited' from other people tabs

* fix: Edge case attempting SSO signin for guest email account

* fix: Correctly set email auth method to cookie

* Improve rate limit error display

* lint: cleanup / comments

* Improve invalid token error display

* style tweaks

* pass guest value to subdomain

* Restore copy link option

* feat: Allow invite revoke from people management

* fix: Incorrect users email schema does not allow for user deletion

* lint

* fix: avatarUrl for deleted user failure

* change default to off for guest invites

* fix: Changing security settings wipes subdomain

* fix: user delete permissioning

* test: Add user.invite specs
2019-12-15 18:46:08 -08:00
Tom Moor
cbd9ff2dd9 fixes #1093 – account for no previous revision in backlinks service 2019-12-07 11:40:15 -08:00
Tom Moor
dd11bb9079 feat: Add warning for self-hosted installations that don't auth auth method configured 2019-12-05 13:22:06 -08:00
Tom Moor
828ce086cc fix: Account for unset S3 url when starting application 2019-12-05 12:55:46 -08:00
Tom Moor
682151554b fix: Additional SQL cascades required 2019-11-18 20:14:55 -08:00
Tom Moor
3ea79dd31a fix: Additional SQL cascades required 2019-11-18 19:49:33 -08:00
Tom Moor
e404955394
feat: Trash (#1082)
* wip: trash

* Enable restoration of deleted documents

* update Trash icon

* Add endpoint to trigger garbage collection

* fix: account for drafts

* fix: Archived documents should be deletable

* fix: Missing delete cascade

* bump: upgrade rich-markdown-editor
2019-11-18 18:51:32 -08:00
Himanshu Agarwal
f06097d9e8 chore: Remove marketing material from OSS project (#941)
* changes to support Plainhome

* changes to env sample

* changes to env variable names

* formatter fixes

* remove the content pages

* test fix

* lint fixes

* minor fixes

* removed unnesscary routes

* Apply suggestions from code review

Co-Authored-By: Tom Moor <tom.moor@gmail.com>

* removed team name from env
2019-11-03 15:01:46 -08:00
Tom Moor
2d2ad83469 fix: Cannot move a document to nested child in private collection 2019-10-16 08:45:21 -07:00
Tom Moor
65b8fb40f3 fix: Empty collection causes export failure
closes #1043
2019-10-12 19:31:15 -07:00
Tom Moor
ec4d4fb20f fix: Show error message when signing in to suspended account
closes #1056
2019-10-12 19:16:17 -07:00