Commit Graph

68 Commits

Author SHA1 Message Date
Chuck Driesler 76b84e2068 fix(workspaces): wrapper type on limited workspace team (#4635) 2025-04-30 16:42:57 +01:00
Kristaps Fabians Geikins cf833a7719 fix(server): project role updates after workspace role/seat changes (#4599)
* fix(workspaces): workspace role sync

* role changes fixed + validated

* seat changes validated

* fix tests

---------

Co-authored-by: Charles Driesler <chuck@speckle.systems>
2025-04-29 10:49:37 +03:00
Chuck Driesler d7aa0196fc feat(authz): automate policies (#4491) 2025-04-18 11:03:54 +02:00
Kristaps Fabians Geikins 62cc07b072 feat(server): add new workspace disclaimer fields to user meta (#4434)
* feat(server): add new workspace disclaimer fields to user meta

* unrelated tests fix
2025-04-16 12:47:33 +03:00
Kristaps Fabians Geikins b287702145 feat: version checks + generally improved auth error messaging (#4384)
* foundation for new version checks

* canUpdate policy

* can req render

* canReceive

* BE implemented

* FE checks implemented?

* test fix

* improved auth error messaging

* fix lint
2025-04-14 10:43:48 +01:00
Kristaps Fabians Geikins f59c0a72c6 feat: model related auth checks in BE & FE (#4374)
* limit fragment cleanup

* be updated

* model checks in FE

* tests fix

* fakes util fix
2025-04-11 10:09:54 +03:00
Kristaps Fabians Geikins b6c21fd506 feat: comment read/write auth policies in BE & FE (#4368)
* webhooks perm minor fix

* tryna get fileimport service to work

* new comment policies - shared

* BE done?

* checks implemented in FE

* lint fix

* tests fix

* readme fix
2025-04-10 15:14:34 +03:00
Kristaps Fabians Geikins ec2fb34283 feat(shared): new policies for minor fragment refactor (#4343)
* canUpdate + reworked fragments

* feat(shared): new policies for minor fragment refactor

* some cleanup

* canUpdate tests

* ensureMinimumProjectRoleFragment test

* checkIfPubliclyReadableProjectFragment tests

* get rid of LoadersOf/ErrorsOf

* python dep update
2025-04-08 12:28:20 +03:00
Chuck Driesler 35e99d6ee7 feat(workspaces): emit who will be added to workspace for a given project move (#4332)
* wip

* feat(workspaces): preflight service wip

* feat(workspaces): move project to workspace dry run

* fix(workspaces): add tests and refine query

* chore(workspaces): gqlgen
2025-04-07 10:27:08 +01:00
Chuck Driesler 855185245e feat(workspaces): consolidate workspace role/seat reporting (#4315)
* feat(workspaces: shuffle seat type counts around

* fix(workspaces): use new counts

* fix(workspaces): better field placement

* Updated FE

* chore(workspaces): fix tests

* fix(workspaces): use correct flags

* fix(workspaces): correct another test

* fix(workspaces): use correct model count function

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2025-04-04 10:27:49 +01:00
Chuck Driesler 6cea72e4f8 feat(workspaces): add query for fetching usage (#4306)
* WIP can create project

* WIP can create project more work

* complete body, stencil tests

* feat(shared): move workspace plan types into shared

* test progress wip

* feat(shared): add more logic to canCreateWorkspaceProject

* a few more tests, as a treat

* chore(authz): round out tests

* fixed loaders, new GQL checks, dataLoaders in auth loaders

* fix(authz): get workspace limits loader

* chore(authz): update loaders

* frontend fixed up to snuff

* fix(authz): fix workspace plans for tests

* fix(authz): classic

* feat(workspaces): emit plan usage from BE

* fix(authz): 0 counts

* fix(workspaces): fix counts for 0

* chore(workspaces): gqlgen

* fix(workspaces): update fragment to use new fields

* fix(workspaces): count regional projects correctly

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2025-04-03 09:06:34 +01:00
Gergő Jedlicska f501cc4ad5 gergo/web 2888 workspace project cancreate (#4294)
* WIP can create project

* WIP can create project more work

* complete body, stencil tests

* feat(shared): move workspace plan types into shared

* test progress wip

* feat(shared): add more logic to canCreateWorkspaceProject

* a few more tests, as a treat

* chore(authz): round out tests

* fixed loaders, new GQL checks, dataLoaders in auth loaders

* fix(authz): get workspace limits loader

* chore(authz): update loaders

* frontend fixed up to snuff

* fix(authz): fix workspace plans for tests

* fix(authz): classic

* fix(authz): 0 counts

---------

Co-authored-by: Chuck Driesler <chuck@speckle.systems>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2025-04-01 16:38:20 +01:00
Kristaps Fabians Geikins a83bae8d84 feat: Workspace/ProjectCollaborator/WorkspaceCollaborator seatType (#4284)
* Workspace & ProjectCollaborator seat type

* minor adjustment to FE

* minor adjustment to FE
2025-03-31 13:07:35 +03:00
Alessandro Magionami eaf3b3a479 feat(gatekeeper): seats counts 2025-03-25 09:47:13 +01:00
Kristaps Fabians Geikins 954b1a9f11 feat: plan prices accurately read from Stripe (#4104)
* WIP prices + new caching utils

* cached workspace plan prices

* GQL API done

* integrated in frontend

* fixed missing FF

* CR fixes

* integration tests

* removed non-existant team yearly env var
2025-03-05 12:23:38 +02:00
Kristaps Fabians Geikins ec092fb042 chore: move common workspace plan/feature config to @speckle/shared (#4064)
fix: gqlgen regenerated
2025-02-27 11:18:30 +02:00
Alessandro Magionami fd68c6ef2a feat(workspaces): user workspace join requests (#4023)
* feat(workspaces): user workspace join requests

* chore(workspaces): return limited workspace

* chore(workspaces): fix tests

* chore(workspaces): add index for userId

* chore(shared): fix totalcount on getpaginateditems

* chore(workspaces): add workspace core resolvers to throw specific error
2025-02-25 12:19:21 +01:00
Alessandro Magionami 6d0f08b7b5 feat(workspaces): approve join request (#3833)
* feat(workspaces): approve join request

* chore(workspaces): add missing dep to resolver call

* chore(workspaces): use commandFactory
2025-01-16 16:46:59 +01:00
Alessandro Magionami 7bf3c5df74 chore(workspaces): fix graphql enum 2025-01-14 17:58:51 +01:00
Alessandro Magionami bb73ecbe3c feat(workspaces): list workspace join requests for admin 2025-01-14 12:02:57 +01:00
Gergő Jedlicska 229a19c981 gergo/workspaceAdmin (#3677)
* feat(workspaces): add unified paginated items service

* feat(workspaces): admin update workspace plan
2024-12-11 18:54:24 +01:00
Gergő Jedlicska e30b8c83b9 gergo/workspacesMultiRegion (#3477)
* feat(webhook-service): learn to speak multi region

* feat(fileimport-service): talk multi region to me

* feat(fileuploads, blobs): multi region

* feat(workspaces): update delet workspace with billing and regions

* fix typo

* feat(workspaces): remove old billing resolvers

* test(workspaces): fix tests

* fix(workspaces): remove unused schema
2024-11-19 15:45:03 +01:00
Kristaps Fabians Geikins 9b5873e4f5 feat(server): SmartTextEditorValue.attachments multiregion support (#3513) 2024-11-19 15:58:40 +02: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
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
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 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
Kristaps Fabians Geikins 62d749f02c schema.js to TS 2024-09-26 14:24:05 +03: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
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
Alessandro Magionami 9669a94552 chore(workspaces): optimize project roles resolvers 2024-09-16 17:27:43 +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 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
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
Gergő Jedlicska 625fec4294 feat(workspaces): leave workspace (#2585) 2024-08-06 16:55:40 +02:00
Alessandro Magionami 12685af29a Alessandro/web 1388 mutation create new email (#2561)
* feat(useremails): userEmails graphql query

* feat(useremails): create user email mutation

* feat(useremails): set primary and delete user email mutations

* chore(useremails): fix update user email type

* chore(useremails): create typed tests for graphql and emails field resolver in user type

* chore(userEmails): group user email mutations in a specific mutation object

* linting fixes

* more lint fixes

* tests fix

* more test fixes

* chore(userEmails): cleanup

* chore(useremails): rely on knex trx for transaction handling

* chore(useremails): fix checkemail not present

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2024-08-05 18:39:52 +02: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
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