Commit Graph

161 Commits

Author SHA1 Message Date
Alessandro Magionami d489975037 Activitystream IoC 4 addCommitCreatedActivity (#3239)
* chore(activitystream): addStreamUpdatedActivity refactor multi region

* chore(activitystream): addStreamAccessRequestedActivity refactor multiregion

* chore(activitystream): addStreamAccessRequestDeclinedActivity refactor multiregion

* chore(activitystream): onUserCreated refactor multiregion

* chore(activitystream): addCommitCreatedActivity refactor multiregion

* chore(activitystream): fix types
2024-10-11 15:49:38 +02:00
Kristaps Fabians Geikins 5b5dd201e2 chore(server): IoC 29 - getStream(s)Factory 2024-10-09 10:39:00 +03:00
Alessandro Magionami d8e789ef6a chore(activitystream): addStreamInviteAcceptedActivity refactor multi region 2024-10-08 10:43:16 +02:00
Alessandro Magionami 68dc836e7f chore(activitystream): addStreamPermissionsRevokedActivity refactor multiregion 2024-10-08 09:51:47 +02:00
Kristaps Fabians Geikins 1c07c76106 chore(server): shared IoC 4 - middleware cleanup (#3119) 2024-09-26 12:17:19 +03:00
Iain Sproat b3f07fa2ce chore(server): Use helpers to get S3 environment variables (#3118)
- use helper method when converting environment variable to boolean
2024-09-26 11:04:41 +02:00
Alessandro Magionami 9714ab5764 Merge pull request #3117 from specklesystems/fabians/shared-ioc-3
chore(server): shared IoC 3 - repo cleanup
2024-09-25 15:19:03 +02:00
Alessandro Magionami d4ec3ebc3f Merge pull request #3116 from specklesystems/fabians/shared-ioc-2
chore(server): shared IoC 2 - authz pipelines
2024-09-25 15:11:01 +02:00
Alessandro Magionami 8903b9c515 Merge pull request #3115 from specklesystems/fabians/shared-ioc-1
chore(server): shared IoC 1 - index.js
2024-09-25 15:10:09 +02:00
Kristaps Fabians Geikins c757d9d03a chore(server): shared IoC 3 - repo cleanup 2024-09-25 16:06:28 +03:00
Kristaps Fabians Geikins c1a87bd6ce chore(server): shared IoC 2 - authz pipelines 2024-09-25 15:59:41 +03:00
Kristaps Fabians Geikins 3653762f59 anutha one 2024-09-25 15:57:53 +03:00
Kristaps Fabians Geikins 7a5bf6cc79 bugfix 2024-09-25 15:55:49 +03:00
Kristaps Fabians Geikins af92ad0e78 chore(server): shared IoC 1 - index.js 2024-09-25 14:58:25 +03:00
Iain Sproat f93d9093a0 fix(errors): all error should define an appropriate status code (#3112)
* fix(errors): all error should define a status code (default is 500)
- rename NoInviteFoundError to InviteNotFoundError to match xNotFoundError pattern

* remove unused errors
2024-09-25 13:08:13 +02:00
Alessandro Magionami 65db85e7e1 Merge pull request #3067 from specklesystems/fabians/automate-ioc-13
chore(server): automate IoC 13 - logStream API
2024-09-23 11:28:09 +02:00
Kristaps Fabians Geikins b29a06b386 chore(server): automate IoC 13 - logStream API 2024-09-20 15:49:13 +03:00
Kristaps Fabians Geikins 3b47774a9a chore(server): auth typescript cleanup (#3045)
* chore(server): auth IoC 19 - setupStrategiesFactory

* chore(server): auth typescript cleanup
2024-09-20 12:23:12 +03:00
Gergő Jedlicska 00c01db923 feat(workspaces): add workspace slug support (#2982)
* feat(workspaces): add workspace slug support

* chore(workspaces): lint

* feat(workspaces): add slug validation and generation

* fix(workspaces): test lint miss
2024-09-18 13:29:36 +02:00
Chuck Driesler 56d392424d feat(workspaces): move project to workspace (#2992)
* feat(workspaces): move project, like this

* fix(workspaces): use new event

* fix(workspaces): add resolver again after merge

* chore(workspaces): lint

* fix(workspaces): works but is a bit illegal

* fix(workspaces): use service update

* chore(workspaces): add unit tests

* fix(workspaces): use transaction

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-09-18 10:38:27 +02:00
Chuck Driesler ac6dd70d27 feat(workspaces): default workspace project role (#3013)
* feat(workspaces): enable default project role in workspace

* fix(workspaces): not satisfying

* chore(workspaces): phrasing

* fix(workspaces): use new field in role mapping

* chore(workspaces): use roles

* fix(workspaces): update tests

* fix(workspaces): more parallel role update errors

* chore(workspaces): like this now

* chore(workspaces): revert changes to deps

* fix(workspaces): assert domain type conversion at gql layer

* fix(workspaces): repair tests

* fix(workspaces): fix more tests
2024-09-17 22:17:10 +02:00
Kristaps Fabians Geikins 39a37b0623 chore(server): fileuploads IoC 1 - listenForImportUpdatesFactory 2024-09-11 14:40:06 +03:00
Iain Sproat 3c9d9f8e3c chore(server): log graphql websocket connection, disconnection, and subscription events (#2690) 2024-09-06 12:17:46 +01:00
Kristaps Fabians Geikins c92938eff3 chore(server): apollo server v3 -> v4 (#2880)
* main changes seem to be done?

* lint fix

* minor cleanup

* dataloader clear
2024-09-05 12:27:13 +03:00
Chuck Driesler fc26fe4c9e fix(workspaces): transact workspace role changes (#2752)
* fix(workspaces): transact all simultaneous workspace-project role changes

* fix(workspaces): more correct usage of transactions

* fix(workspaces): add tests for transaction-based role changes

* fix(workspaces): do not leak knex into domain

* fix(workspaces): transaction-ify factory functions

* fix(workspaces): factory-ify some old functions

* fix(workspaces): missed a resolver

* fix(workspaces): delete comment (very difficult)
2024-08-28 16:53:10 +02:00
Iain Sproat 131918b428 fix(server): default max multi-part file upload greater than objects (#2742)
- when sending Speckle objects to the server, they are batched into multi-part files
- a multi-part file therefore contains one or more Speckle objects
- the maximum limit for the multi-part file must therefore be greater than the maximum limit for a single Speckle object
2024-08-26 16:42:33 +01:00
Gergő Jedlicska 08e941f8af Poor man's SSO (#2641)
* Implemented workspace general page

* Added notifications to user input

* Allowed non-admins to view but not edit

* Added redirect to homeroute

* Fixed validation

* Squashed commit of the following:

commit 7bf14ab8af0f76b4c9d0aa87fc08085af7c34959
Author: Chuck Driesler <chuck@speckle.systems>
Date:   Tue Aug 6 19:40:50 2024 +0200

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:packages/server/modules/workspacesCore/migrations/20240806160740_workspace_domains.ts

commit 8aa3fb0cb052c10eeeb83bf9874ae0d1c065e480
Author: Alessandro Magionami <alessandro.magionami@gmail.com>
Date:   Tue Aug 6 18:54:15 2024 +0200

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:packages/server/modules/core/domain/userEmails/operations.ts

commit 66dfd0cf6c15a789c8f96a65a3168323e83a7b9e
Author: Chuck Driesler <chuck@speckle.systems>
Date:   Tue Aug 6 18:30:22 2024 +0200

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:packages/server/modules/workspacesCore/domain/types.ts

Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com>

* Move General to workspaces folder

* feat(workspaces): inputs on security section

* feat(workspaces): add domain to workspace mutation

* chore(workspaces): add blocked domains list

* fix(workspaces): modals with buttons

* feat(workspaceDomains): delete domain

* fix(workspaces): use  mutation

* fix(workspaces): present user verified domains as options

* Moved sidebar menu to a composable

* Added coming soon tag back

* feat(workspaces): create domains resolver for workspace

* chore(workspaces): fix tests

* chore(workspaces): fix types

* chore(workspaces): fix linter

* fix(workspaces): do some delete I think

* chore(workspaces): add domainBasedMembershipProtectionEnabled field to workspace

* chore(workspaces): improve validation for email domain

* fix(workspace): query and do the thing

* chore(workspaces): add graphql schema for domainBasedMembershipProtection

* chore(workspaces): lint and test failures

* fix(workspaces): test issues w new field

* feat(workspaces): add discoverability flag

* chore(workspaces): they made me do it

* feat(workspaces): enable toggling domain protection

* feat(workspaces): add discoverability toggle to workspace settings

* feat(workspace): auto enable discoverability on first domain registration

* feat(workspace): discoverability toggle fixes

* fix(eventBus): fix tests

* feat(workspaces): user discoverable workspaces (#2620)

* feat(workspaces): it works just trust me

* fix(workspaces): don't worry about it

* fix(workspaces); happy path success

* fix(workspaces): almost there

* fix(workspaces): successful tests!

* fix(workspaces): we have DISCOVERED (#2621)

* Fixed linting issue

* Updated query

* Updated validation rules

* Updated validation rules

* Fix unsaved file with type export

* Addressed PR comments

* Updated cache

* Updated item classes, add fragment back

* Gergo/web 1574 join workspaces via discovery (#2623)

* chore(useremails): add find verified emails by user function

* chore(workspace): table helper for workspace domains

* chore(workspace): get workspace with domains function

* chore(workspace): test get workspace with domains function

* feat(workspace): restrict workspace membership when updating workspace role

* chore(workspaces): fix types

* feat(workspaces): WIP join

* feat(workspaces): join button makes u join

* chore(useremails): fix type for find verified emails function

* feat(workspaces): join

* feat(workspace): prevent inviting user without email matching domain

* chore(workspaces): fix linter

* fix(workspaces): invoke join (gergo wrote this)

* fuck

* fix(workspaces): properly get discoverable workspaces

* fix(workspaces): test

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Chuck Driesler <chuck@speckle.systems>

* fix(workspaces): some query stuff

* fix(workspaces): mutate cache instead of refetch

* fix(workspaces): more adjustments to gql query and fragment structure

* fix(workspaces): queries, style, structure

* fix(workspaces): match discoverability with current styles

* chore(workspaces): lint lint lint

* fix(workspaces): got it twisted

* chore(workspaces): fix test

* fix(workspaces): route to joined workspace on join

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
Co-authored-by: Chuck Driesler <chuck@speckle.systems>
Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com>
2024-08-26 13:33:16 +02:00
Iain Sproat 26b0ecb55d chore(server): remove sentry and only apply mixpanel middleware if enabled (#2732)
- remove sentry as we are no longer using it
- only enable mixpanel middleware if mixpanel is enabled
2024-08-23 16:56:54 +01:00
Iain Sproat 6715a030ec fix(server/auth): database errors result in 500 status code (#2731)
* fix(server/auth): database errors result in 500 status code
- previously 401 were returned which resulted in connectors not retrying

* log as info, not error. Handle errors while validating read

* Unknown errors should continue to be bubbled up the stack
2024-08-22 15:39:37 +02:00
Chuck Driesler 63735eb044 feat(workspaces): work(space) invader default logos (#2708)
* feat(workspaces): add default logo index

* Added WorkspaceAvatar component

* Added WorkspaceAvatar component

* Fix issues

* Fix Avatar

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-08-21 13:53:37 +01:00
Chuck Driesler 79d4e2d402 chore(comments): update comments module to typescript (#2513)
* chore(comments): files to .ts

* chore(comment): services to .ts

* chore(comments): repo to .ts

* chore(comments): resolvers to .ts

* chore(comments): init to .ts

* fix(comments): FIXME for non-null assertions

* chore(comments): drop some comments
2024-08-21 13:03:02 +01:00
Iain Sproat 60251e45cb Revert "fix(server): revert 55cad9662a (#2633)" (#2650)
This reverts commit f2c5677b4a.
2024-08-13 11:48:20 +01:00
Gergő Jedlicska 5818a44e62 Gatekeeper (#2572)
* feat(gatekeeper): initial license validation

* test(gatekeeper): add license token to tests

* chore(gatekeeper): cleanup

* chore(gatekeeper): hide from circleci

* feat(helm): load license token from secrets

* chore(circleci): remove unused env var
2024-08-13 11:04:40 +02:00
Iain Sproat f2c5677b4a fix(server): revert 55cad9662a (#2633)
* Revert "refactor(server/upload): convert js to ts (#2618)"

This reverts commit e9f7286f67.

* Revert "feat(logging): pass request logger to core/services/objects (#2599)"

This reverts commit ee3e9af78d.

* Revert "feat(server): configurable maximum objects POST size and improved logging (#2594)"

This reverts commit 55cad9662a.
2024-08-12 10:26:53 +01:00
Iain Sproat 55cad9662a feat(server): configurable maximum objects POST size and improved logging (#2594) 2024-08-08 16:19:25 +01:00
Iain Sproat d9f9da77f4 chore(readiness): server pods are not ready if no free db connections (#2552)
- adds high frequency metrics for knex connections
2024-08-07 11:07:34 +01:00
Kristaps Fabians Geikins 50b5bdbbdd chore(server): typescriptified auth strategies (#2589)
* rebuilt strategies.js

* local.js -> local.ts

* oidc.js -> oidc.ts

* google.js -> google.ts

* github.js -> github.ts

* azure-ad.js -> azureAd.ts

* minor fixes

* FE2 regen

* improved error reference page

* minor adjustment

* more error page improvements

* migrated helper

* testfix
2024-08-07 11:38:44 +03:00
Chuck Driesler c97ccb48a1 fix(workspaces): support workspace logos as base64 strings (#2556)
* fix(workspaces): support workspace logos as base64 strings

* fix(workspaces): fix those testsss

* fix(workspaces): migration! and more test fixes
2024-08-02 13:04:20 +02:00
Iain Sproat 1c048b4111 refactor(server): use env helper to consistently find max connections (#2563) 2024-08-01 17:24:17 +01:00
Kristaps Fabians Geikins 57cef1eabc workspace mocks fix, post server invites + setter helpers (#2536) 2024-07-29 15:42:49 +03:00
Kristaps Fabians Geikins ede566eed9 feat(server): serverInvites refactor + workspace invites CRUD & GQL API (#2530)
* prep for new resources algo

* typescriptifying stuff

* minor types fix

* migrate to resources col

* repo & creation updated, WIP processing/retrieval

* WIP invite processing

* finished finalization refactor

* project invite management

* transformed all invites services

* fixed up projects & core serverinvites resolvers

* test fixes

* WIP workspace create GQL & test

* basic invite creation test works

* a buncha working tests

* more tests

* cancelation tests

* minor invite use refactor

* invite retrieval tasks

* invite use() works as expected

* filtering out broken invites

* enabled invite retrieval by token irregardless of who is it for

* minor adjustments

* tests fix

* test config improvements

* test env adjustment

* extra test case

* making resource access limits harder to ignore

* linter fixes

* eventBus type cleanup

* better generic names

* refactored serverinvites resource migration

* fix(server): better error message in project invite edge case
2024-07-29 14:37:54 +03:00
Kristaps Fabians Geikins 1e5dadacd3 feat(server): modularized mocks + workspace mocks for Mike (#2534)
* modularized mocks foundation + updated workspaces gql

* base queries done

* mutations done

* cleaner API for mock helpers

* greatly improved mock definition DX
2024-07-29 11:21:59 +03:00
Chuck Driesler 6eaf3c8c92 feat(workspaces): cru(d) resolvers (#2521)
* feat(workspaces): drop createdByUserId from the dataschema

* feat(workspaces): repositories WIP

* merge

* protect against removing last admin in workspace

* quick impl and stub tests

* add tests

* services

* unit tests for role services

* feat(workspaces): authorize project creation if workspace specified

* feat(workspaces): emit project created event

* feat(workspaces): assign roles on project create in workspace

* feat(workspaces): update project roles when user added to workspace

* feat(workspaces): stencil gql resolvers

* fix(workspaces): lol lmao

* fix(workspaces): perform automatic project role update in service function

* fix(workspaces): also delete roles

* fix(workspaces): broke tests again oops

* fix(workspaces): update `onProjectCreated` listener to use new repo method

* fix(workspaces): use service function in event listener

* fix(workspaces): get workspace projects via existing stream repo functions

* fix(workspaces): roles mapping in domain, use enum

* feat(workspaces): stencil gql api and resolvers

* fix(workspaces): repair type reference in tests

* fix(workspaces): consolidate files, use different existing stream-getter

* fix(workspaces): more specific error

* fix(workspaces): roles and scopes

* fix(workspaces): yield per page

* fix(workspaces): some test dry

* fix(workspaces): superdry

* fix(workspaces): add scopes

* fix(workspaces): classic

* feat(workspaces): create workspace mutation

* feat(workspaces): I'm sure everything will be fine

* fix(workspaces): yep

* fix(workspaces): successful gql e2e test

* feat(workspaces): update workspace resolver

* chore(workspaces): update resolver test

* feat(workspaces): some retrieval resolvers

* chore(workspaces): tests for query resolvers

* fix(chore): revert temp test command change

* fix(workspaces): test structure and gql types

* fix(workspaces): validate user authz to perform some operations

* fix(workspaces): use existing test infrastructure

* fix(workspaces): stop `isPublic` check if authorizing a workspace resource

* fix(workspaces): better test hygiene

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-07-25 12:58:28 +01:00
Gergő Jedlicska ee6e5e22b1 gergo/eventBus (#2498)
* feat(eventBus): WIP event bus typescript wizardy

* feat(eventBus): final eventbus setup with all the typescript foo

* fix(workspaces): fix workspace core imports

* test(workspaces): fix expected events name

* test(workspaces): fix tests
2024-07-12 15:35:40 +02:00
Kristaps Fabians Geikins ee5ae8af62 fix(fe2): accept invite before onboarding after sign up (#2491)
* explicitly ordering global middlewares

* various subscription fixes & WIP project invite middleware

* SSR invite accept & toast notifs seem to work

* backend support for mixpanel

* mixpanel be logic -> shared

* minor fix

* finissh

* lint fix

* minor comment adjustments

* better adblock handling
2024-07-11 11:45:11 +03:00
Kristaps Fabians Geikins 0b2ca9a515 feat: add missing FE1 fields to the FE2 GQL schema (#2471)
* WIP version create

* commitCreate migrated

* minor cleanup

* commitReceived migrated

* added Project.object

* Project.comment introduced

* moving away old API usages in FE1

* ProjectMutations.batchDelete

* project pending access requests

* WIP project access req tests

* project access req tests done

* ModelByName test

* version mutation tests

* project.object tests

* batch delete tests

* minor improvements to redirect logging
2024-07-10 11:33:53 +02:00
Chuck Driesler 7b3f1d20ec fix(workspaces): construct acl query based on table name (#2464) 2024-07-02 14:58:27 +01:00
Kristaps Fabians Geikins d944b99172 fix(server): unexpected INTERNAL_SERVER_ERROR error codes for expected error cases (#2461) 2024-07-02 12:44:36 +03:00
Gergő Jedlicska 7c16abc8eb feat(workspace): 1119 define workspaces dataschema (#2431)
* feat(workspaces): add workspaces module with roles and scopes

* feat(workspaces): add domain, graphql and persistent storage dataschema

* fix(workspaces): correct db injections

* chore(workspaces): add EE license

* chore(license): mentions workspaces separately in license file

* fix(core): roles import in migration

* fix(workspaces): drop workspace_acl on down migration

* fix(workspaces): roles constants

* fix(workspaces): coding standards

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-06-26 17:00:56 +02:00
Gergő Jedlicska c6cd4c311d feat(serverinvites): create domain module in server invites (#2401)
* chore(serverinvites): repository refactor for multiregion

* chore(serverinvites): remove migrated functions from old repository

* chore(serverinvites): refactor serverInviteForToken resolver for multiregion

* chore(serverinvites): invite processing service refactor for multiregion

* chore(serverinvites): subscription refactor for multiregion

* chore(serverinvites): move buildEmailContents to dedicated file

* chore(serverinvites): deleteAllStreamInvites function multiregion refactor

* chore(serverinvites): refactor deleteServerOnlyInvites multiregion repository

* chore(serverinvites): complete repository refactor for multiregion

* feat(serverinvites): create domain module in server invites

* fix(serverinvites): no relative imports

* feat(serverinvites): extract individual types from repository

* feat(serverinvites): move interfaces to operations

* fix(serverinvites): update imports referencing old interfaces file

* fix(serverinvites): type mismatch for insert invite and delete old

* chore(serverinvites): refactor to single repo function

* test(serverinvites): fix tests

* fix(serverinvites): use domain types in all places

* feat(serverinvites): WIP unity

* feat(serverinvites): move to new facory names and types

* feat(serverinvites): fix tests

* fix(serverinvites): use factory name

---------

Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com>
2024-06-25 13:24:37 +02:00