Commit Graph

146 Commits

Author SHA1 Message Date
Gergő Jedlicska f210d9b749 gergo/web 2109 project region based db connection selector (#3434)
* feat(projects): add project regions, default to null

* feat(multiregion): add projectRegion Db client lookup logic

* feat(multiregion): add project region repositories and caching

* feat(multiRegion): db initialization and get project db client

* feat(docker-compose): add second db for regions testing

* feat(multiRegion): initialize region with pubs and subs working

* fix(multiRegion): get region client even if it was registered in another pod

* feat(workspaces): create workspace resolver split

* feat: update server region metadata

* feat(projects): rewrite project creation

* feat(multiRegion): getRegionDb

* fix(workspaces): get projects now can retur null

* feat(multiRegion): make local multi region DB-s work

* feat: set d efault workspace region

* CR changes

* tests

* feat(multiRegion): bind region properly

* fe update

* test fixes

* feat(multiRegion): automatically create aiven extras plugin

* ci(postgres): use published postgres with aiven extras

* fix(multiRegion): roll back the aiven extras migration, there is a better way

* tests fix

* fix(billing): we do not need to add a seat, if the workspace is on a plan, but has no sub

---------

Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2024-11-06 17:29:08 +01:00
Kristaps Fabians Geikins 1c0482b48a feat: update server region metadata (#3433) 2024-11-05 13:29:51 +01:00
Chuck Driesler b195df37d6 feat(sso): active user sso information (#3432)
* feat(workspaces): add workspace sso feature flag

* feat(workspaceSso): wip validate sso

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* WIP

* fix(sso): restructure to handle all branches at end of flow

* fix(sso): add and validate emails used for sso

* fix(sso): park progress

* chore(workspaces): review sso login/valdate

* fix(sso): adjust validate url

* chore(sso): auth header puzzle

* fix(sso): happy-path config

* chore(gql): gqlgen

* fix(sso): almost almost

* fix(sso): auth endpoint

* a lil more terse

* fix(sso): light at the end of the tunnel

* fix(sso): improve catch block error messages

* fix(sso): session lifespan => validUntil

* fix(sso): I think we've got it

* feat(sso): limited workspace values for public sso login

* fix(sso): use factory functions

* fix(sso): til decrypt is single-use

* fix(sso): correct usage of access codes

* fix(sso): use finalize middleware in all routes

* chore(sso): cheeky tweak

* fix(sso): move some types around

* fix(sso): stencil final shape I'm sleepy

* fix(sso): more factories more factories

* fix(sso): on to final boss of factories

* fix(sso): needs a haircut but she works

* fix(sso): init rest w function, not side-effects

* fix(sso): /authn => /sso

* chore(sso): errors

* chore(sso): test test test

* chore(sso): test all the corners

* feat(sso): list workspace sso memberships

* chore(sso): tests, expose in rest

* fix(sso): sketch active user auth

* fix(sso): expose search via gql

* fix(sso): active user session information

* chore(sso): sso session test utils

* chore(sso): test sso session repo/services

* chore(sso): gqlgen

* fix(sso): simplify gql resolver structure

* chore(sso): gqlgen

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-11-05 12:27:46 +00:00
Chuck Driesler e6e65a2f7d feat(sso): list sso associations by user email (#3420)
* feat(workspaces): add workspace sso feature flag

* feat(workspaceSso): wip validate sso

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* feat(workspaces): validate and add sso provider to the workspace with user sso sessions

* WIP

* fix(sso): restructure to handle all branches at end of flow

* fix(sso): add and validate emails used for sso

* fix(sso): park progress

* chore(workspaces): review sso login/valdate

* fix(sso): adjust validate url

* chore(sso): auth header puzzle

* fix(sso): happy-path config

* chore(gql): gqlgen

* fix(sso): almost almost

* fix(sso): auth endpoint

* a lil more terse

* fix(sso): light at the end of the tunnel

* fix(sso): improve catch block error messages

* fix(sso): session lifespan => validUntil

* fix(sso): I think we've got it

* feat(sso): limited workspace values for public sso login

* fix(sso): use factory functions

* fix(sso): til decrypt is single-use

* fix(sso): correct usage of access codes

* fix(sso): use finalize middleware in all routes

* chore(sso): cheeky tweak

* fix(sso): move some types around

* fix(sso): stencil final shape I'm sleepy

* fix(sso): more factories more factories

* fix(sso): on to final boss of factories

* fix(sso): needs a haircut but she works

* fix(sso): init rest w function, not side-effects

* fix(sso): /authn => /sso

* chore(sso): errors

* chore(sso): test test test

* chore(sso): test all the corners

* feat(sso): list workspace sso memberships

* chore(sso): tests, expose in rest

* fix(sso): expose search via gql

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-11-01 11:27:12 +01:00
Kristaps Fabians Geikins 5df716bf1c feat: add & list server regions (#3423)
* WIP create modal

* babababa

* create dialog looks ok

* FE largely there

* workss

* cleanup

* fixed up test plumbing to avoid deadlocks and simplify GQL calls

* test fix

* added all tests

* CI fix
2024-10-31 16:08:50 +01:00
Kristaps Fabians Geikins 55d0d10103 Merge pull request #3406 from specklesystems/fabians/multi-region-base
feat(server): multi region module base w/ a test (mocked) mutation
2024-10-30 10:25:04 +00:00
Kristaps Fabians Geikins 610808fc15 feat(server): multi region module base w/ a test (mocked) mutation 2024-10-29 14:07:35 +02:00
Gergő Jedlicska 3184855aa7 gergo/checkoutGqlResolver (#3405)
* feat(gatekeeper): add all plan statuses

* chore(gatekeeper): gqlgen
2024-10-28 18:10:31 +01:00
Alessandro Magionami 11c13796c2 Merge pull request #3393 from specklesystems/fabians/gendo-ioc-5
chore(server): gendo IoC #5 - getVersionRenderRequestFactory
2024-10-28 15:17:56 +01:00
Gergő Jedlicska af3857a209 gergo/web 2038 billing graphql api (#3379)
* feat(gatekeeper): add gatekeeper module feature flag

* feat(gatekeeper): add workspace pricing table domain

* feat(gatekeeper): add checkout session creation

* feat(gatekeeper): verify stripe signature

* wip(gatekeeper): checkout callbacks

* feat(gatekeeper): add unlimited and academia plan types

* refactor(envHelper): getStringFromEnv helper

* chore(gatekeeper): add future todos

* feat(gatekeeper): add productId to the subscription domain

* feat(gatekeeper): add in memory repositories

* feat(gatekeeper): add more errors

* feat(gatekeeper): complete checkout session service

* feat(gatekeeper): add stripe client implementation

* feat(gatekeeper): add checkout session completion webhook callback path

* feat(gendo): fix not needing env vars if gendo module is not enabled

* feat(gatekeeper): require a license for billing

* chore(gatekeeper): cleanup before testing

* feat(gatekeeper): subscriptionData parsing model

* ci: add billing integration and gatekeeper modules to test config

* test(gatekeeper): add checkout service tests

* feat(gatekeeper): make completeCheckout callback idempotent properly

* feat(gatekeeper): move to knex based repositories

* test(gatekeeper): billing repository tests

* feat(gatekeeper): add yearly billing cycle toggle

* feat(ci): add stripe integration context to test job

* feat(billingPage): conditionally render the checkout CTAs

* fix(gatekeeper): remove flaky test condition

* feat(helm): add billing integration feature flag

* WIP billing gql api

* feat(gatekeeper): cancel checkout session api

* feat(gatekeeper): handle existing checkout sessions, when trying to create a new one

* feat(gatekeeper): add workspace plans gql api

* feat(gatekeeper): handle cancelation and subscription updates

* fix(gatekeeper): scope initialization

* fix(gatekeeper): eliminate stripe client import sideeffect

* fix(gatekeeper): eliminate stripe client import sideeffect 2

* fix(mainConstants): fitler gatekeeper scopes with feature flag
2024-10-25 10:46:09 +02:00
Kristaps Fabians Geikins 4a29e5f650 chore(server): gendo IoC #5 - getVersionRenderRequestFactory 2024-10-24 17:01:09 +03:00
Kristaps Fabians Geikins 6d53308fd8 chore(server): gendo IoC #1 - prep/cleanup before getting started 2024-10-24 15:39:41 +03:00
Chuck Driesler dc9519f141 fix(workspaces): emit slug with discoverable workspaces (#3361)
* fix(workspaces): emit slug with discoverable workspaces

* chore(workspaces): gql lint
2024-10-23 09:50:08 +01:00
Gergő Jedlicska 8cba7eb6f7 gergo/web 1968 add features list (#3332)
* feat(gatekeeper): add gatekeeper module feature flag

* feat(gatekeeper): add workspace pricing table domain

* feat(gatekeeper): add checkout session creation

* feat(gatekeeper): verify stripe signature

* wip(gatekeeper): checkout callbacks

* feat(gatekeeper): add unlimited and academia plan types

* refactor(envHelper): getStringFromEnv helper

* chore(gatekeeper): add future todos

* feat(gatekeeper): add productId to the subscription domain

* feat(gatekeeper): add in memory repositories

* feat(gatekeeper): add more errors

* feat(gatekeeper): complete checkout session service

* feat(gatekeeper): add stripe client implementation

* feat(gatekeeper): add checkout session completion webhook callback path

* feat(gendo): fix not needing env vars if gendo module is not enabled

* feat(gatekeeper): require a license for billing

* chore(gatekeeper): cleanup before testing

* feat(gatekeeper): subscriptionData parsing model

* ci: add billing integration and gatekeeper modules to test config

* test(gatekeeper): add checkout service tests

* feat(gatekeeper): make completeCheckout callback idempotent properly

* feat(gatekeeper): move to knex based repositories

* test(gatekeeper): billing repository tests

* feat(gatekeeper): add yearly billing cycle toggle

* feat(ci): add stripe integration context to test job

* feat(billingPage): conditionally render the checkout CTAs

* fix(gatekeeper): remove flaky test condition

* feat(helm): add billing integration feature flag
2024-10-20 15:40:31 +02:00
Kristaps Fabians Geikins 5016fad919 feat(server): make Project.version query throw if version not found (#3336) 2024-10-18 15:32:58 +03:00
Kristaps Fabians Geikins 0d2fb7db9b chore(server): core IoC #82 - (most) branches resolvers to TS 2024-10-17 13:24:33 +03:00
Kristaps Fabians Geikins 93d0ffd31b chore(server): core IoC #81 - server resolvers to TS (#3319) 2024-10-17 13:23:06 +03:00
Chuck Driesler e7ba48e320 Feat: Remove guests from workspace members table (#3219) 2024-10-10 14:25:45 +02:00
Kristaps Fabians Geikins 7d9bb3c4ea fix: single workspace admin cant accept own invite (#3197) 2024-10-08 12:44:17 +03:00
andrewwallacespeckle ebef771c3a refactor(fe2): Update queries to use workspaceBySlug (#3177)
* Use workspaceBySlug

* workspace invite support slug

* fix workspace invite email link

* added tests

* Update workspaceInvite query to use new option

* useSlug directly in query

---------

Co-authored-by: Fabis <fabis94@live.com>
2024-10-02 13:01:38 +01:00
Alessandro Magionami fe424a98b6 Merge pull request #3082 from specklesystems/alessandro/web-943-get-stream-activity
Alessandro/web 943 get stream activity
2024-09-24 10:48:52 +02:00
Alessandro Magionami daa742382f Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-943-get-stream-activity 2024-09-23 15:59:55 +02:00
Gergő Jedlicska 4b944bb259 feat(workspaces): get workspace by slug gql api (#3080) 2024-09-23 15:56:00 +02:00
Alessandro Magionami 6920bb1f0c chore(activitystream): refactor getStreamActivity 2024-09-23 15:40:49 +02: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
Alessandro Magionami 9669a94552 chore(workspaces): optimize project roles resolvers 2024-09-16 17:27:43 +02:00
Alessandro Magionami 0d9ff2514a Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-1767-guest-table-should-show-what-they-have-access-to 2024-09-16 16:14:54 +02:00
Kristaps Fabians Geikins f5ebb7de08 fix(server): workspace status check query (#2991) 2024-09-13 14:51:48 +03:00
Kristaps Fabians Geikins 2569f190cb Revert "fix(server): workspace status check query"
This reverts commit 5413269273.
2024-09-13 14:02:56 +03:00
Kristaps Fabians Geikins 5413269273 fix(server): workspace status check query 2024-09-13 14:02:04 +03:00
Alessandro Magionami c84924b474 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-1767-guest-table-should-show-what-they-have-access-to 2024-09-13 10:26:25 +02:00
Alessandro Magionami 090e8b8b3b feat(workspaces): add resolver to workspace for projectRoles 2024-09-13 10:25:46 +02:00
Kristaps Fabians Geikins ee41c83df7 feat(server): allow unlimited project thread retrieval (#2976)
* feat(server): allow unlimited project thread retrieval

* Remove limit from frontend

---------

Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
2024-09-12 16:15:14 +01:00
Alessandro Magionami 6bda45ac61 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-957-get-webhooks 2024-09-11 15:59:07 +02:00
Alessandro Magionami 378b4e3edc chore(webhooks): fix codegen types 2024-09-11 15:49:18 +02:00
Kristaps Fabians Geikins f60d459ead chore(server): blobstorage IoC 1 - getBlobs 2024-09-11 15:30:36 +03:00
Kristaps Fabians Geikins a30073c725 chore: refactor stats module to ts 2024-09-10 09:38:16 +03:00
Alessandro Magionami 3fa2bcd4f3 Alessandro/web 1836 billing tab show x10 free guest (#2896)
* feat(workspaces): add label field to cost items

* feat(workspaces): use label field to display cost items
2024-09-06 10:42:31 +02:00
Chuck Driesler beabb5552b Chuck/guests bug (#2863)
* fix(workspace): why can't guests seeeeee

* fix(workspaces): fix reference in test

* fix(workspaces): idk
2024-09-03 17:44:20 +02:00
Chuck Driesler 9ec90cd64f fix(workspaces): guarantee that workspace admins are project owners (#2835)
* fix(workspaces): separate resolver for workspace project role update

* fix(workspaces): frontend protection

* fix(workspaces): new composable, clearer errors

* fix(workspaces): correct logic

* fix(workspaces): gen
2024-09-03 17:18:30 +02:00
Chuck Driesler 39c34b1b78 fix(workspaces): safer billing query for guests (#2844)
* fix(workspaces): safer billing query for guests

* chore(workspaces): comment

* chore(workspaces): lint

* chore(workspaces): ope
2024-09-02 15:23:27 +01:00
Mike 2c14fbc8e7 Fix permissions for project members (#2792) 2024-08-30 14:26:02 +01:00
Chuck Driesler bbd5146e5a fix(workspaces): add pagination to workspace team members (#2644)
* fix(workspaces): a suggestion of paginated teams

* fix(workspaces): workspace team pagination (?)

* fix(workspaces): pagination based on acl createdAt

* fix(workspaces): fix some roles-related tests

* fix(workspaces): improve query and tests

* fix(workspaces): collaborators query without incorrect groupBy

* fix(workspaces): add default values to migration

* Fixed queries and fragments

* Merged main

* Remove comment

* chore(workspaces): update WorkspaceCollaboratorCollection mocks

* chore(workspaces): fix role test

* chore(workspaces); ope

* fix(workspaces): move workspace acl timestamps to separate table

* Merge?

* fix(workspaces) drop that table

* fix(workspaces): cursor

* fix(workspaceInvites): undo merge borkage

* fix(workspaces): rework workspace member pagination

* fix(workspaces): fix test

* fix(workspaces): test test

* fix(workspaces): literally garbage

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-08-29 21:17:37 +02:00
Alessandro Magionami ff29654b66 feat(workspaces): add discount and total fields 2024-08-29 15:20:51 +02:00
Alessandro Magionami a0224e2f40 Alessandro/web 1660 workspace cost items subtotal and currency (#2793)
* chore(workspaces): workspace cost schema

* chore(workspaces): test helper for workspace cost

* feat(workspaces): workspace billing cost

* fix(workspaces): fix onProjectCreated failing for the project creator if the creator is a member

* refactor(workspaces): change workspace cost calculation to a simpler query

* test(workspaceCost): fix costing logic and tests

* fix(workspaceTests): project emmiter needs owner now

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-08-29 13:45:04 +02:00
Gergő Jedlicska 32919c89da gergo/web 1746 add resolver for workspace domain policy compliance per user (#2797)
* fix(users): verified should be a public limited user field

* feat(workspaceSecurity): update security tab copy

* feat(workspaces): add limited user domain policy compliance check
2024-08-29 11:11:08 +02:00
Alessandro Magionami 0ac36af93e Alessandro/web 1659 workspace limits (#2733)
* chore(workspaces): billing version limit graphql schema

* chore(workspaces): billing member role required

* chore(core): test helper for random string

* chore(core): test helpers

* chore(workspaces): workspaces billing version resolver

* chore(workspaces): rename version to versionsCount
2024-08-26 17:53:34 +02:00