Commit Graph

36 Commits

Author SHA1 Message Date
Kristaps Fabians Geikins 4dae1569cd feat(fe2): invite + list workspace invites (#2629)
* list invites table

* invites list works

* update last reminded date on resend

* fix FE

* WIP invitedialog + updated debounced utility

* invite create works

* exclude users correctly

* more adjustments

* minor cleanup

* using workspace invite server role

* test fix

* fixed multiple root eslint issues

* minor adjustments
2024-08-12 11:30:01 +03:00
Kristaps Fabians Geikins fc5c764c06 unblocking main 2024-08-08 12:31:45 +03:00
Chuck Driesler 7bb40134eb fix(workspaces): add filtering to workspace team query (#2586)
* chore(workspaces): add some tests for new filters

* fix(workspaces): args style
2024-08-08 07:15:55 +02:00
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
Kristaps Fabians Geikins 455b21cba3 fix(server): manual workspace role assignment on project invite create + more bugfixes (#2581)
* prep for new projectinvite create mutation

* fix for serverRole not being taken into account in stream invite

* new workspace invite create mutation
2024-08-06 13:42:10 +03:00
Chuck Driesler 97b44bad94 fix(workspaces): backend validation on workspace settings fields (#2584)
* fix(workspaces): backend validation on workspace settings fields

* chore(workspaces): move authz to resolver level
2024-08-06 11:25:19 +01:00
Chuck Driesler 65a0666c9c fix(workspaces): expect correct format for workspace image strings (#2568) 2024-08-05 17:27:13 +02:00
Kristaps Fabians Geikins 7383779375 feat(server): registration (w/ and w/o invites) tests (#2567)
* WIP tests

* a couple of tests done

* most server registration tests done

* finalized tests

* lint fix

* added login tests too
2024-08-05 16:21:56 +03:00
Chuck Driesler 0212f865fa fix(workspaces): better logic in workspace project pagination test (#2570) 2024-08-03 09:50:04 +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 8a9659f223 feat(workspaces): workspace member role resolvers (#2540)
* feat(workspaces): update/delete workspace role resolvers

* chore(workspaces): gql tests for role changes

* fix(workspaces): test syntax oops

* fix(workspaces): got it twisted

* fix(workspaces): simplify api surface, better return types

* fix(workspaces): correct role type usage, improve tests

* fix(workspaces): authorize in resolver

* fix(workspaces): correct usage of authorizeResolver
2024-08-01 09:36:52 +01:00
Chuck Driesler 170a44b9ec chore(workspaces): tests for workspace project creation (#2541)
* chore(workspaces): tests for workspace project creation

* fix(workspaces): build error after type change

* fix(workspaces): assorted hygiene and correctness

* chore(workspaces): add tests for paginated workspace projects query

* fix(workspaces): repair bad test ordering

* fix(workspaces): test hygiene

* fix(workspaces): a bit more correct
2024-07-31 17:40:03 +01:00
Kristaps Fabians Geikins 57cef1eabc workspace mocks fix, post server invites + setter helpers (#2536) 2024-07-29 15:42:49 +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
Kristaps Fabians Geikins 1e5dadacd3 feat(server): modularized mocks + workspace mocks for Mike (#2534)
* modularized mocks foundation + updated workspaces gql

* base queries done

* mutations done

* cleaner API for mock helpers

* greatly improved mock definition DX
2024-07-29 11:21:59 +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 66eb539aa0 feat(workspaces): assign project roles for workspace projects (#2499)
* 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

* 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

* fix(workspaces): repair type reference in tests

* fix(workspaces): consolidate files, use different existing stream-getter

* fix(workspaces): more specific error

* fix(workspaces): yield per page

* fix(workspaces): some test dry

* fix(workspaces): superdry

* fix(workspaces): classic

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-07-20 00:03:27 +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
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
Charles Driesler a4c9fbab16 ugh 2024-06-28 14:30:51 +01:00
Charles Driesler fc69e26905 event emitter test 2024-06-28 12:41:49 +01:00
Charles Driesler b0344b1eae workspace repo fct and emitter 2024-06-28 12:31:37 +01:00
Gergő Jedlicska c046979640 test(workspaces): fix tests 2024-06-28 07:50:14 +02:00
Gergő Jedlicska d4ef3e97df feat(workspaces): add blob store as workspace create deps 2024-06-26 21:47:16 +02:00
Gergő Jedlicska ddf5480d71 Merge branch 'main' of github.com:specklesystems/speckle-server into gergo/web-1146-workspace-creation-service 2024-06-26 21:30:42 +02:00
Gergő Jedlicska 7c16abc8eb feat(workspace): 1119 define workspaces dataschema (#2431)
* feat(workspaces): add workspaces module with roles and scopes

* feat(workspaces): add domain, graphql and persistent storage dataschema

* fix(workspaces): correct db injections

* chore(workspaces): add EE license

* chore(license): mentions workspaces separately in license file

* fix(core): roles import in migration

* fix(workspaces): drop workspace_acl on down migration

* fix(workspaces): roles constants

* fix(workspaces): coding standards

---------

Co-authored-by: Dimitrie Stefanescu <didimitrie@gmail.com>
2024-06-26 17:00:56 +02:00
Gergő Jedlicska ff0cd77483 feat(workspaces): wip workspace creation 2024-06-25 17:07:38 +02:00
Gergő Jedlicska b59c24c844 fix(workspaces): roles constants 2024-06-25 15:40:41 +02:00
Gergő Jedlicska 8696a73d44 fix(workspaces): drop workspace_acl on down migration 2024-06-25 15:31:28 +02:00
Gergő Jedlicska 7714cc87a8 chore(workspaces): add EE license 2024-06-25 13:23:19 +02:00
Gergő Jedlicska 549a38dd53 feat(workspaces): add domain, graphql and persistent storage dataschema 2024-06-22 11:32:54 +02:00
Gergő Jedlicska 0b98278d86 feat(workspaces): add workspaces module with roles and scopes 2024-06-21 18:40:46 +02:00