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
* feat: Add user flags concept, for tracking bits on a user
* feat: Example flag usage for user invite resend abuse
* wip
* test
* fix: Set correct flag
* Refactor worker, all emails on task system
* fix
* lint
* fix: Remove a bunch of expect-error comments in related tests
* refactor: Move work from utils.gc into tasks
* test
* Add tracing to tasks and processors
fix: DebounceProcessor triggering on all events
Event.add -> Event.schedule
* Migrations, models, commands
* ui
* Move starred hint to location state
* lint
* tsc
* refactor
* Add collection empty state in expanded sidebar
* Add empty placeholder within starred collections
* Drag and drop improves, Relative refactor
* fix: Starring untitled draft leaves empty space
* fix: Creating draft in starred collection shouldnt open main
* fix: Dupe drop cursor
* Final fixes
* fix: Canonical redirect replaces starred location state
* fix: Don't show reorder cursor at the top of collection with no permission to edit when dragging
This PR moves the entire project to Typescript. Due to the ~1000 ignores this will lead to a messy codebase for a while, but the churn is worth it – all of those ignore comments are places that were never type-safe previously.
closes#1282
* Add defaultUserRole on server
* Handle defaultUserRole on frontend
* Handle tests
* Handle user role in userCreator
* Minor improvments
* Fix prettier issue
* Undefined when isNewTeam is false
* Update app/scenes/Settings/Security.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/scenes/Settings/Security.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Update app/scenes/Settings/Security.js
Co-authored-by: Tom Moor <tom.moor@gmail.com>
* Remove duplicate validation
* Update Team.js
* fix: Move note out of restricted width wrapper
* Move language setting to use 'note' prop
* Remove admin option
Co-authored-by: Tom Moor <tom.moor@gmail.com>