Commit Graph

337 Commits

Author SHA1 Message Date
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
Gergő Jedlicska 61ca128ce2 gergo/multiCurrency (#4379)
* feat(gatekeeper): support multiple currencies

* feat(helm): add new currency based prices to helm chart

* chore(env): add example currency based pricing values

* fix(ci): update price ids to the proper values

* feat(helm): rename price ids to fit multi currency

* feat(gatekeeper): currency input for checkout session

* Updated prices in the FE

* chore(gatekeeper): remove old checkout session flow

* Updated prices in the FE

* Fix FE

* Fix pipeline

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2025-04-11 17:37:47 +02:00
Chuck Driesler 32796d3dd3 fix(authz): allow optional project id (#4363) 2025-04-10 10:12:00 +01:00
Chuck Driesler ea114fd394 fix(authz): only exempt empty main model (#4358) 2025-04-09 15:27:03 +01:00
Chuck Driesler 7cddc87deb fix(workspaces): use new roles for project moves on new plans (#4316)
* chore(workspaces): move project role mapping in tests

* fix(workspaces): new world move project to workspace

* chore(workspaces): adjust move project tests

* fix(workspaces): that's on me
2025-04-08 15:32:05 +01:00
Chuck Driesler cb7243cfbe feat(authz): Project.canCreateModel and Project.canMoveToWorkspace policies (#4342)
* feat(authz): Project.canCreateModel policy

* feat(authz): Project.canMoveToWorkspace policy

* fix(authz): expose policies as permissions objects

* chore(authz): actually use the policies lol

* chore(authz): add tests for new policies

* fix(authz): skip affected test

* fix(authz): pr comments

* fix(authz): better errors, better tests

* chore(authz): remove references to deleted error
2025-04-08 15:29:12 +01:00
Gergő Jedlicska a3644a50c5 gergo/web 2931 introduce missing workspace plans (#4323)
* fix(gatekeeper): missing priceId-s should stop the server from booting

* feat(shared): add all new workspace plans

* feat(billing): add new world plans

* feat(ci): use stripe sandbox id-s from test env vars

* chore(ci): remove defunct stripe context

* chore(server-env): fix server env example

* feat(gatekeeper): add missing plans to graphql schema

* test(gatekeeper): update plan upgrade tests to match implementation

* fix(ci): update ci .env source

* fix(ci): we do need some secrets from stripe

* fix(ci): run gql schema introspect with the test env

* fix(frontend): format new plan names

* chore(ci): temp disable gql schema checks

* feat(helm): add unlimited seat prices env vars

* feat(helm): add unlimited seat prices to values

* feat(gatekeeper): do not load priceId-s as a side effect, load with module init
2025-04-07 15:24:57 +02:00
Kristaps Fabians Geikins 820a1e2ebf feat(server): workspace roles taken into account in project queries (#4319)
* Workspace.projects fixed

* Query.project tested & fixed

* personalOnly flag added

* withProjectRoleOnly flag

* authorizeResolver implicit workspace roles

* minor cleanup

* reorg + support for throwing auth errors

* global error mapping

* undo special borkage

* CR fixes

* more CR fixes

* shared tests fix

* minor adjustment

* tests fix

* see if removing cached roles fixes it?

* more fixes

* clean up debugging garbage
2025-04-07 12:52:07 +03:00
Kristaps Fabians Geikins e3d3c1446b feat: enable domain discoverability on workspace creation (#4235)
* frontend changes implemented

* WIP BE

* backend seems to work

* CR fixes
2025-04-07 12:34:45 +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
Alessandro Magionami 4a7d37e3d7 Merge pull request #4300 from specklesystems/alessandro/web-2874-return-user-counts-by-role-and-seat-type
Alessandro/web 2874 return user counts by role and seat type
2025-03-31 18:50:15 +02:00
Alessandro Magionami 57c6763953 chore(workspaces): fix imports 2025-03-31 17:39:15 +02:00
Alessandro Magionami de1054720b feat(workspaces): member by role counts 2025-03-31 17:15:36 +02:00
Alessandro Magionami 99d9c9a2ad feat(workspaces): seats by type counts in workspace 2025-03-31 16:43:00 +02:00
Alessandro Magionami 8540eedab4 feat(workspaces): code review changes 2025-03-31 15:48:04 +02:00
Alessandro Magionami b15423d767 chore(workspaces): code review changes 2025-03-31 15:46:16 +02:00
Alessandro Magionami f70072d069 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2906-list-invitable-workspace-members-in-a-project 2025-03-31 15:11:17 +02:00
Chuck Driesler b1da1d97a2 fix(workspaces): domain compliance by slug (#4295) 2025-03-31 13:36:22 +01:00
Alessandro Magionami d7ced64168 chore(workspaces): code review changes 2025-03-31 14:32:29 +02:00
Alessandro Magionami 0187cef785 chore(workspaces): code review changes 2025-03-31 12:09:52 +02:00
Alessandro Magionami 6c99ddb215 feat(workspaces): fix tests 2025-03-31 10:52:05 +02:00
Alessandro Magionami 1b956c15d4 feat(workspaces): fix build 2025-03-31 10:21:06 +02:00
Alessandro Magionami 34bebce186 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2906-list-invitable-workspace-members-in-a-project 2025-03-31 09:38:36 +02:00
Alessandro Magionami 9b106b49a1 feat(workspaces): resolver for invitable collaborators 2025-03-31 09:38:17 +02:00
Alessandro Magionami bbef398cd3 feat(workspaces): repository functions for invitable collaborators 2025-03-31 09:37:52 +02:00
Chuck Driesler 7be2e39913 chore(tests): dramatically reduce scope/time of multi-region tests (#4282)
* chore(tests): limit multiregion ci to multiregion tests

* fix(multiregion): unsure if this works

* fix(multiregion): ope we got deleted
2025-03-28 00:28:38 +00:00
Kristaps Fabians Geikins c54d15fd93 feat: authz frontend foundation + reworked errors (#4275)
* feat: authz frontend foundation + reworked errors

* lint fixes

* test fix

* fixed noCache() util
2025-03-27 16:13:35 +02:00
Kristaps Fabians Geikins 20789281e1 chore: back to 1 extra region in tests (#4277)
* chore: back to 1 extra region in tests

* chore: back to 1 extra region in tests

* commenting out multiple multiregion tests
2025-03-27 15:28:00 +02:00
Alessandro Magionami a38bbd4066 feat(workspaces): add viewers count 2025-03-26 10:24:14 +01:00
Alessandro Magionami 3102a75d3b Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2867-expose-used-and-available-seats 2025-03-26 09:21:12 +01:00
Alessandro Magionami 5d6d0769fd Merge pull request #4236 from specklesystems/alessandro/web-2803-downscale-workspace-subscription
Alessandro/web 2803 downscale workspace subscription
2025-03-26 09:14:41 +01:00
Kristaps Fabians Geikins a6a4ceee86 feat: true-myth result structures & other auth policy improvements (#4262)
* fixing up typing

* better dynamic loader mechanism

* buildReqLoaders cleanup

* added caching to loaders

* ensuring all loaders are async

* fe2 plugins error handling fix

* feat(shared): true-myth result structures & other auth policy improvements

* moving workspaceCore loaders to correct place
2025-03-25 17:49:02 +01:00
Alessandro Magionami 55648c3125 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2867-expose-used-and-available-seats 2025-03-25 15:26:12 +01:00
Kristaps Fabians Geikins f76a2c34d3 chore: add no floating promises lint rule (#4249)
* chore: add no floating promises lint rule

* minor cleanup

* fix test by only running if node 22 or greater

---------

Co-authored-by: Iain Sproat <68657+iainsproat@users.noreply.github.com>
2025-03-25 13:36:49 +02:00
Alessandro Magionami eaf3b3a479 feat(gatekeeper): seats counts 2025-03-25 09:47:13 +01:00
Alessandro Magionami 01042e9d2d Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2803-downscale-workspace-subscription 2025-03-24 11:06:33 +01:00
Alessandro Magionami 6a09d07c59 feat(workspaces): fix filter type 2025-03-24 11:05:38 +01:00
Alessandro Magionami 9429e47b93 feat(workspaces): add filter by seatType in workspace team 2025-03-24 10:29:36 +01:00
Gergő Jedlicska 968d2f2520 auth/lib (#4242)
* wip

* wip

* feat(authz): wip policy shape

* wip

* fix(authz): canReadProject with latest pattern

* wip

* feat(shared): simplify authz checks and policies

* feat(shared): port role weights into shared

* test(shared): some more tests for authz

* test(shared): more query project tests

* typo!

* feat(shared): ff loading refinements

* feat(shared): example authorization policy integration

* authz loaders init

* chore(authz): naming etc

* wip

* fix(authz): authz error objects

Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Gergő Jedlicska <gjedlicska@users.noreply.github.com>

* fix(authz): use correct role weights

* chore(authz): use codes from errors in tests

* chore(authz): wow

* chore(authz): fix more tests, add more tests

* chore(authz): fix some tests, add some tests (again)

* fix(authz): fix tests again

* fix(server): you need to await !!!! otherwise it crashes the server.

---------

Co-authored-by: Charles Driesler <chuck@speckle.systems>
Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Gergő Jedlicska <gjedlicska@users.noreply.github.com>
2025-03-21 16:37:36 +01:00
Chuck Driesler 66da283a79 Revert "feat(authz): shared authz pipeline (#4151)" (#4241)
This reverts commit cb8aa31b66.
2025-03-21 15:41:17 +01:00
Chuck Driesler cb8aa31b66 feat(authz): shared authz pipeline (#4151)
* wip

* wip

* feat(authz): wip policy shape

* wip

* fix(authz): canReadProject with latest pattern

* wip

* feat(shared): simplify authz checks and policies

* feat(shared): port role weights into shared

* test(shared): some more tests for authz

* test(shared): more query project tests

* typo!

* feat(shared): ff loading refinements

* feat(shared): example authorization policy integration

* authz loaders init

* chore(authz): naming etc

* wip

* fix(authz): authz error objects

Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Gergő Jedlicska <gjedlicska@users.noreply.github.com>

* fix(authz): use correct role weights

* chore(authz): use codes from errors in tests

* chore(authz): wow

* chore(authz): fix more tests, add more tests

* chore(authz): fix some tests, add some tests (again)

* fix(authz): fix tests again

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@users.noreply.github.com>
Co-authored-by: Gergő Jedlicska <gjedlicska@users.noreply.github.com>
2025-03-21 14:45:36 +01:00
Alessandro Magionami 362a0e6141 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2803-downscale-workspace-subscription 2025-03-21 11:14:49 +01:00
Alessandro Magionami 89f20bbae3 Merge pull request #4229 from specklesystems/alessandro/web-2869-filter-dismissed-workspace-join-requests
fix(workspaces): filter out dismissed join requests
2025-03-20 13:20:45 +01:00
Mike b1e3a4bb72 Feat: Add createdAt to workspace team WorkspaceCollaborator (#4227) 2025-03-20 12:50:10 +01:00
Kristaps Fabians Geikins e24c26e3d2 feat: getting rid of defaultProjectRole setting (#4221)
* feat: getting rid of defaultProjectRole setting

* get stdout reporting in CI

* yarn lock fix

* fix package.json

* better CI test output

* pinning mocha-multi
2025-03-20 12:58:30 +02:00
Chuck Driesler d39c52a324 feat(regions): use queue for moves (#4060)
* chore(regions): failing test for moving blobs

* fix(blobs): use blob storage table

* chore(regions): include file_uploads table for thoroughness

* fix(regions): extract repeated string to utils

* chore(regions): move validation as own service

* feat(regions): update project region key after move

* chore(regions): update tests to make gql requests

* feat(regions): queue wip

* fix(regions): trigger job instead of performing change synchronously

* chore(regions): update tests for job queue

* fix(regions): use the queue
2025-03-20 10:35:39 +00:00
Alessandro Magionami 7e944b182e Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2803-downscale-workspace-subscription 2025-03-20 10:32:21 +01:00