Commit Graph

209 Commits

Author SHA1 Message Date
Daniel Gak Anagrov 06e19fbd50 feat(gatekeeper): add updatedAt field to workspace plans (#4786)
* feat(gatekeeper): add updatedAt field to workspace plans

* fix: lint error

* fix: added updatedAt test

* fix: shared test
2025-05-26 11:35:53 +02:00
Chuck Driesler 70f07fc725 fix(embed): use correct id (#4798) 2025-05-22 15:35:44 +01:00
Chuck Driesler 780d001a1e feat(embed): expose embed feature access at project level (#4796)
* feat(embed): expose embed feature access at project level

* fix(embeds): use switch
2025-05-22 12:22:06 +01:00
Kristaps Fabians Geikins 9998ed2586 feat: personal project limits (#4759)
* base limits cleanup

* history limit tests

* canCreatePersonal & tests

* canInvite block

* WIP model check

* fix tests

* shared tests fix

* lodash import fix

* lint fix

* help update

* hopefully fixing test

* CR comment
2025-05-20 14:56:05 +03:00
Iain Sproat 853aa6f1e9 Merge pull request #4626 from specklesystems/iain/web-3198-payment-failed-leads-to-404-on-missing-subscription
fix(server/billing): better handle incomplete checkout
2025-05-19 18:07:57 +01:00
Kristaps Fabians Geikins 5ff030224b fix(server): fallback to viewer if no seat found (#4748) 2025-05-15 12:04:56 +03:00
Gergő Jedlicska 380e55b7aa fix(server): we should default to a viewer seat in the rare cases of no seat assigned to the user (#4735) 2025-05-14 10:04:09 +03:00
Kristaps Fabians Geikins 211922b6a6 chore: get rid of all old workspace plan code (#4624)
* first batch of changes

* tests fix

* FE fixed

* renaming constants

* test fixes

* moar test fixes

* another test fix

* reenable app rover check

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2025-04-30 19:18:32 +02:00
Iain Sproat 7edaa2944b tests 2025-04-29 12:43:17 +01:00
Iain Sproat bdd902a578 fix(server/billing): better handle incomplete checkout 2025-04-29 11:59:21 +01:00
Kristaps Fabians Geikins 89391d92ab feat(server): get workspace seat usage w/o a subscription (#4574)
* feat(server): get workspace seat usage w/o a subscription

* minor cleanup
2025-04-23 15:26:02 +03:00
Iain Sproat bcd99b634e Merge branch 'main' into iain/disable-plan-migration-scheduler 2025-04-23 12:17:50 +01:00
Kristaps Fabians Geikins 11e1fcd85c fix(server): workspace migration failing for userless workspaces (#4569) 2025-04-23 13:14:02 +03:00
Chuck Driesler 968859e061 fix(billing): update db subcription expiry date on upgrade (#4544) 2025-04-22 17:15:15 +01:00
Iain Sproat 920099c39f chore(readable code): use TIME_MS for readable durations
- we recently added TIME_MS helper; this applies it to existing durations
2025-04-18 17:51:43 +01:00
Gergő Jedlicska 2d26c76ef2 feat(limits): better limits messages and some more fixes 2025-04-18 15:58:28 +02:00
Iain Sproat dc6824f839 chore(server/migrations): disable workspace plan migrations 2025-04-17 16:46:49 +01:00
Mike 7d70ce5f48 Fix: Stripe canceled redirect (#4476) 2025-04-17 13:14:15 +01:00
Iain Sproat b5c5296e72 chore(server/logging): simplify withOperationLogging parameters
- complex error handling should be done by the business operation, we do not need to pass in a callback
2025-04-17 09:41:40 +01:00
Kristaps Fabians Geikins 0cc19dbdf5 fix(fe2): not being able to remove member from workspace (#4468)
* fix(fe2): not being able to remove member from workspace

* minor comment

* withTransaction refactor
2025-04-17 10:44:55 +03:00
Gergő Jedlicska c33052e697 fix(gatekeeper): accept workspace project invite fixes (#4426)
* fix(gatekeeper): accept workspace project invite fixes

* chore(gatekeeper): remove old subscription event handler
2025-04-17 05:21:23 +01:00
Gergő Jedlicska ef08f8cecf fix(gatekeeper): only return available seats if there are some (#4463) 2025-04-16 18:30:18 +01:00
Iain Sproat 37e9e9829d Merge pull request #4458 from specklesystems/iain/improve-migration-script-logging
chore(logging): improve logs & error messages for workspace migration
2025-04-16 13:23:13 +01:00
Iain Sproat 225af5d251 fix log reference 2025-04-16 12:57:13 +01:00
Iain Sproat b0bdeb9768 chore(logging): improve logs & error messages for workspace migration 2025-04-16 12:52:03 +01:00
Gergő Jedlicska fb28654311 feat(gatekeeper): re-enable workspace plan migrations (#4457) 2025-04-16 13:13:12 +02:00
Gergő Jedlicska 30e39ccb01 fix(gatekeeper): fix subscription upgrades (#4411) 2025-04-15 08:55:33 +02:00
Iain Sproat 149cc1871e chore(logging): observability of operations related to auth 2025-04-14 13:36:03 +01:00
Gergő Jedlicska bf454bc003 fix(gatekeeper): fix yearly upgrade not working (#4393) 2025-04-14 06:24:20 +02: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
Iain Sproat 9308fa82b4 chore(server/observability): logging of gatekeeper/rest/billing (#4066)
* chore(server/observability): logging of gatekeeper/rest/billing

* Rename logged field

* use logWithErr, operationStatus, and operationName
- clean up logging

* Fix bad merge from main

* Use a wrapper to log

* Include mutation resolvers

* Fix per PR comments
2025-04-11 15:27:52 +02:00
Gergő Jedlicska 5fce827ad7 feat(gatekeeper): calculate available seats from purchased and used (#4362) 2025-04-09 19:51:02 +02:00
Chuck Driesler ea114fd394 fix(authz): only exempt empty main model (#4358) 2025-04-09 15:27:03 +01:00
Gergő Jedlicska b24add762c feat(gatekeeper): disable workspace plan migrations (#4354) 2025-04-09 13:02:28 +02:00
Gergő Jedlicska b71f0bd5c4 feat(gatekeeper): re-enable workspace plan migrations (#4352) 2025-04-08 20:00:18 +02:00
Gergő Jedlicska 4a7e8ae5f4 temp disable workspace plan migrations (#4349)
* 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

* WIP workspace migration

* feat(gatekeeper): migrate old workspace plans to new

* feat(gatekeeper): add more logs to plan migrations

* fix(ci): do not remove the stripe context

* fix(gatekeeper): handle migration errors

* fix(gatekeeper): temp disabling migrations until they can be fixed
2025-04-08 16:58:22 +02: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 f217f5b17f Gergo/web 2930 workspace migration script (#4333)
* 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

* WIP workspace migration

* feat(gatekeeper): migrate old workspace plans to new

* feat(gatekeeper): add more logs to plan migrations

* fix(ci): do not remove the stripe context

* fix(gatekeeper): handle migration errors
2025-04-08 16:00:38 +02:00
Alessandro Magionami d640f23c7d Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2944-versions-hide-referencedobject 2025-04-07 16:12:41 +02: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
Alessandro Magionami 6f5415e66d Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2944-versions-hide-referencedobject 2025-04-07 12:48:58 +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
Alessandro Magionami 498f26d8df chore(core): fix tests 2025-04-07 09:51:56 +02:00
Alessandro Magionami a02ea60bc7 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-2944-versions-hide-referencedobject 2025-04-07 09:37:04 +02:00
Chuck Driesler cb7dead0b6 fix(workspaces): require models to have versions to count towards billing limits (#4325) 2025-04-04 13:42:30 +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
Alessandro Magionami 5c004f85b1 chore(gatekeeper): get workspace plan repository and dataloader function 2025-04-04 10:51:46 +02: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 272eafe25d chore(workspaces): disable test on ff off 2025-03-31 17:59:48 +02:00