Fixes#3412
Previously the only way to restrict the domains for a Team were with the ALLOWED_DOMAINS environment variable for self hosted instances.
This PR migrates this to be a database backed setting on the Team object. This is done through the creation of a TeamDomain model that is associated with the Team and contains the domain name
This settings is updated on the Security Tab. Here domains can be added or removed from the Team.
On the server side, we take the code paths that previously were using ALLOWED_DOMAINS and switched them to use the Team allowed domains instead
* fix: Enforce single team when self hosting
* test: positive case
* refactor
* fix: Visible error message on login screen for max teams scenario
* Update Notices.js
* lint
* fix: Don't set cookie domain when not using multiple subdomains
* wip logging domain
* wip logging domain
* wip logging domain
* wip logging domain
* Revert "wip logging domain"
This reverts commit 325907e74962179e02cee0b1df364a3aedbe62e3.
* Revert "wip logging domain"
This reverts commit 6ee095a49e9c18999a20d5379234323d49d5e6c8.
* Revert "wip logging domain"
This reverts commit 813d8eb960cdf4dd6db4795739df3adf895600e2.
* Revert "wip logging domain"
This reverts commit f1ca81927626bbd0d46c1963510d115a003176d8.
* Remove SUBDOMAINS_ENABLED from documented env variables, no-one self hosting should need this – it just adds confusion to those looking to host on a single subdomain
fix: Account for server/client process.env parsing
Co-authored-by: Nan Yu <nanyu@Nans-MBP-2.lan>
Co-authored-by: Nan Yu <nan@getoutline.com>
* 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
* Atom / RSS meta link
* Spike
* Feeling good about this spike now
* Remove document.collection
* Remove koa.ctx from all presenters to make them portable outside requests
* Remove full serialized model from events
Move events.add to controllers for now, will eventually be in commands
* collections.create event
parentDocument -> parentDocumentId
* Fix up deprecated tests
* Fixed: Doc creation
* documents.move
* Handle collection deleted
* 💚
* Authorize room join requests
* Move starred data structure
Account for documents with no context on sockets
* Add socket.io-redis
* Add WEBSOCKETS_ENABLED env variable to disable websockets entirely for self hosted
New installations will default to true, existing installations to false
* 💚 No need for promise response here
* Reload notice
* Adding app.json for Heroku -- Procfile already exists
* Removed required false and changed values to strings
* Required is required!
* Tested and working install
* Apply suggestions from code review
Thanks to @tommoor for updating the descriptions for items I wasn't sure about. Added!
Co-Authored-By: bmann <boris@bmannconsulting.com>
* missing coma