Commit Graph

12 Commits

Author SHA1 Message Date
Chuck Driesler b27640194a feat(workspaces): support workspace deletion (#2569)
* feat(workspaces): delete workspace repo function

* feat(workspaces): services for the resolver, crack order of operations, migration

* fix(workspaces): add tests for delete

* fix(workspaces): better service boundary

* fix(workspaces): linttttt
2024-08-07 10:36:52 +02:00
Gergő Jedlicska 625fec4294 feat(workspaces): leave workspace (#2585) 2024-08-06 16:55:40 +02: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
Chuck Driesler b7c281961c fix(workspaces): match workspaces and workspacesCore resolvers (#2560) 2024-08-01 16:48:08 +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
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
Chuck Driesler 27179ad4f1 feat(workspaces): stencil gql resolvers (#2508)
* feat(workspaces): stencil gql resolvers

* fix(workspaces): lol lmao

* feat(workspaces): stencil gql api and resolvers

* fix(workspaces): roles and scopes

* fix(workspaces): add scopes
2024-07-19 12:44:53 +01:00
Chuck Driesler 8a8536b358 fix(workspaces): correctly initialize and import workspaces core module (#2486) 2024-07-15 16:13:17 +02: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
Chuck Driesler e703bb7415 WEB-1140 manage user workspace membership services (#2460)
* 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

* fix(workspaces): maybe tests work like this

* fix(workspaces): dry

* fix(workspaces): initialize tests better

* fix(workspaces): so true

* fix(workspaces): right

* fix(workspaces): self nit

* fix(workspaces): better repository structure

* fix(workspaces): repair tests, use `example.org`

* fix(workspaces): add tests for new repo functions, repair other tests

* fix(workspaces): better distinction between service-level guarantees and repo-level guarantees

* fix(workspaces): review comments and stencil tests

* fix(workspaces): add tests

* fix(workspaces): tests work

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-07-09 18:26:59 +02:00
Gergő Jedlicska 28ce7c757c feat(workspaces): add repository function implementations
Co-authored-by: Charles Driesler <chuck@speckle.systems>
2024-07-04 13:46:48 +01:00
Gergő Jedlicska 307983c94c feat(workspacesCore): initial module migration 2024-06-28 20:14:40 +02:00