Commit Graph

95 Commits

Author SHA1 Message Date
Kristaps Fabians Geikins 5016fad919 feat(server): make Project.version query throw if version not found (#3336) 2024-10-18 15:32:58 +03:00
Chuck Driesler e7ba48e320 Feat: Remove guests from workspace members table (#3219) 2024-10-10 14:25:45 +02:00
Kristaps Fabians Geikins 7d9bb3c4ea fix: single workspace admin cant accept own invite (#3197) 2024-10-08 12:44:17 +03:00
andrewwallacespeckle ebef771c3a refactor(fe2): Update queries to use workspaceBySlug (#3177)
* Use workspaceBySlug

* workspace invite support slug

* fix workspace invite email link

* added tests

* Update workspaceInvite query to use new option

* useSlug directly in query

---------

Co-authored-by: Fabis <fabis94@live.com>
2024-10-02 13:01:38 +01:00
Alessandro Magionami fe424a98b6 Merge pull request #3082 from specklesystems/alessandro/web-943-get-stream-activity
Alessandro/web 943 get stream activity
2024-09-24 10:48:52 +02: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
Gergő Jedlicska 4b944bb259 feat(workspaces): get workspace by slug gql api (#3080) 2024-09-23 15:56:00 +02:00
Alessandro Magionami 6920bb1f0c chore(activitystream): refactor getStreamActivity 2024-09-23 15:40:49 +02:00
Gergő Jedlicska 00c01db923 feat(workspaces): add workspace slug support (#2982)
* feat(workspaces): add workspace slug support

* chore(workspaces): lint

* feat(workspaces): add slug validation and generation

* fix(workspaces): test lint miss
2024-09-18 13:29:36 +02:00
Chuck Driesler 56d392424d feat(workspaces): move project to workspace (#2992)
* feat(workspaces): move project, like this

* fix(workspaces): use new event

* fix(workspaces): add resolver again after merge

* chore(workspaces): lint

* fix(workspaces): works but is a bit illegal

* fix(workspaces): use service update

* chore(workspaces): add unit tests

* fix(workspaces): use transaction

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-09-18 10:38:27 +02:00
Chuck Driesler ac6dd70d27 feat(workspaces): default workspace project role (#3013)
* feat(workspaces): enable default project role in workspace

* fix(workspaces): not satisfying

* chore(workspaces): phrasing

* fix(workspaces): use new field in role mapping

* chore(workspaces): use roles

* fix(workspaces): update tests

* fix(workspaces): more parallel role update errors

* chore(workspaces): like this now

* chore(workspaces): revert changes to deps

* fix(workspaces): assert domain type conversion at gql layer

* fix(workspaces): repair tests

* fix(workspaces): fix more tests
2024-09-17 22:17:10 +02:00
Alessandro Magionami c84924b474 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-1767-guest-table-should-show-what-they-have-access-to 2024-09-13 10:26:25 +02:00
Alessandro Magionami 090e8b8b3b feat(workspaces): add resolver to workspace for projectRoles 2024-09-13 10:25:46 +02:00
Kristaps Fabians Geikins ee41c83df7 feat(server): allow unlimited project thread retrieval (#2976)
* feat(server): allow unlimited project thread retrieval

* Remove limit from frontend

---------

Co-authored-by: andrewwallacespeckle <andrew@speckle.systems>
2024-09-12 16:15:14 +01:00
Alessandro Magionami 3fa2bcd4f3 Alessandro/web 1836 billing tab show x10 free guest (#2896)
* feat(workspaces): add label field to cost items

* feat(workspaces): use label field to display cost items
2024-09-06 10:42:31 +02:00
Chuck Driesler beabb5552b Chuck/guests bug (#2863)
* fix(workspace): why can't guests seeeeee

* fix(workspaces): fix reference in test

* fix(workspaces): idk
2024-09-03 17:44:20 +02: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
Mike 2c14fbc8e7 Fix permissions for project members (#2792) 2024-08-30 14:26:02 +01:00
Chuck Driesler bbd5146e5a fix(workspaces): add pagination to workspace team members (#2644)
* fix(workspaces): a suggestion of paginated teams

* fix(workspaces): workspace team pagination (?)

* fix(workspaces): pagination based on acl createdAt

* fix(workspaces): fix some roles-related tests

* fix(workspaces): improve query and tests

* fix(workspaces): collaborators query without incorrect groupBy

* fix(workspaces): add default values to migration

* Fixed queries and fragments

* Merged main

* Remove comment

* chore(workspaces): update WorkspaceCollaboratorCollection mocks

* chore(workspaces): fix role test

* chore(workspaces); ope

* fix(workspaces): move workspace acl timestamps to separate table

* Merge?

* fix(workspaces) drop that table

* fix(workspaces): cursor

* fix(workspaceInvites): undo merge borkage

* fix(workspaces): rework workspace member pagination

* fix(workspaces): fix test

* fix(workspaces): test test

* fix(workspaces): literally garbage

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-08-29 21:17:37 +02:00
Alessandro Magionami ff29654b66 feat(workspaces): add discount and total fields 2024-08-29 15:20:51 +02:00
Alessandro Magionami a0224e2f40 Alessandro/web 1660 workspace cost items subtotal and currency (#2793)
* chore(workspaces): workspace cost schema

* chore(workspaces): test helper for workspace cost

* feat(workspaces): workspace billing cost

* fix(workspaces): fix onProjectCreated failing for the project creator if the creator is a member

* refactor(workspaces): change workspace cost calculation to a simpler query

* test(workspaceCost): fix costing logic and tests

* fix(workspaceTests): project emmiter needs owner now

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-08-29 13:45:04 +02:00
Gergő Jedlicska 32919c89da gergo/web 1746 add resolver for workspace domain policy compliance per user (#2797)
* fix(users): verified should be a public limited user field

* feat(workspaceSecurity): update security tab copy

* feat(workspaces): add limited user domain policy compliance check
2024-08-29 11:11:08 +02:00
Alessandro Magionami 0ac36af93e Alessandro/web 1659 workspace limits (#2733)
* chore(workspaces): billing version limit graphql schema

* chore(workspaces): billing member role required

* chore(core): test helper for random string

* chore(core): test helpers

* chore(workspaces): workspaces billing version resolver

* chore(workspaces): rename version to versionsCount
2024-08-26 17:53:34 +02:00
Mike 01c9fb4e55 Feat: Workspace creation wizard should allow for optional logo (#2757)
* Fixed reactivity, added workspace logo to create workspace modal

* Reverse order so name is focussed first

* Fix typo

* feat(workspaces): allow sending the logo on ws creation

* Fix avatar uploading

* Added default index 0

* fix(workspaces): maybe default logo

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
2024-08-26 17:20:43 +02:00
Alessandro Magionami e75d424d0c Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-957-update-webhook 2024-08-26 15:16:27 +02:00
Gergő Jedlicska 08e941f8af Poor man's SSO (#2641)
* Implemented workspace general page

* Added notifications to user input

* Allowed non-admins to view but not edit

* Added redirect to homeroute

* Fixed validation

* Squashed commit of the following:

commit 7bf14ab8af0f76b4c9d0aa87fc08085af7c34959
Author: Chuck Driesler <chuck@speckle.systems>
Date:   Tue Aug 6 19:40:50 2024 +0200

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:packages/server/modules/workspacesCore/migrations/20240806160740_workspace_domains.ts

commit 8aa3fb0cb052c10eeeb83bf9874ae0d1c065e480
Author: Alessandro Magionami <alessandro.magionami@gmail.com>
Date:   Tue Aug 6 18:54:15 2024 +0200

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:packages/server/modules/core/domain/userEmails/operations.ts

commit 66dfd0cf6c15a789c8f96a65a3168323e83a7b9e
Author: Chuck Driesler <chuck@speckle.systems>
Date:   Tue Aug 6 18:30:22 2024 +0200

    mob next [ci-skip] [ci skip] [skip ci]

    lastFile:packages/server/modules/workspacesCore/domain/types.ts

Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com>

* Move General to workspaces folder

* feat(workspaces): inputs on security section

* feat(workspaces): add domain to workspace mutation

* chore(workspaces): add blocked domains list

* fix(workspaces): modals with buttons

* feat(workspaceDomains): delete domain

* fix(workspaces): use  mutation

* fix(workspaces): present user verified domains as options

* Moved sidebar menu to a composable

* Added coming soon tag back

* feat(workspaces): create domains resolver for workspace

* chore(workspaces): fix tests

* chore(workspaces): fix types

* chore(workspaces): fix linter

* fix(workspaces): do some delete I think

* chore(workspaces): add domainBasedMembershipProtectionEnabled field to workspace

* chore(workspaces): improve validation for email domain

* fix(workspace): query and do the thing

* chore(workspaces): add graphql schema for domainBasedMembershipProtection

* chore(workspaces): lint and test failures

* fix(workspaces): test issues w new field

* feat(workspaces): add discoverability flag

* chore(workspaces): they made me do it

* feat(workspaces): enable toggling domain protection

* feat(workspaces): add discoverability toggle to workspace settings

* feat(workspace): auto enable discoverability on first domain registration

* feat(workspace): discoverability toggle fixes

* fix(eventBus): fix tests

* feat(workspaces): user discoverable workspaces (#2620)

* feat(workspaces): it works just trust me

* fix(workspaces): don't worry about it

* fix(workspaces); happy path success

* fix(workspaces): almost there

* fix(workspaces): successful tests!

* fix(workspaces): we have DISCOVERED (#2621)

* Fixed linting issue

* Updated query

* Updated validation rules

* Updated validation rules

* Fix unsaved file with type export

* Addressed PR comments

* Updated cache

* Updated item classes, add fragment back

* Gergo/web 1574 join workspaces via discovery (#2623)

* chore(useremails): add find verified emails by user function

* chore(workspace): table helper for workspace domains

* chore(workspace): get workspace with domains function

* chore(workspace): test get workspace with domains function

* feat(workspace): restrict workspace membership when updating workspace role

* chore(workspaces): fix types

* feat(workspaces): WIP join

* feat(workspaces): join button makes u join

* chore(useremails): fix type for find verified emails function

* feat(workspaces): join

* feat(workspace): prevent inviting user without email matching domain

* chore(workspaces): fix linter

* fix(workspaces): invoke join (gergo wrote this)

* fuck

* fix(workspaces): properly get discoverable workspaces

* fix(workspaces): test

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Chuck Driesler <chuck@speckle.systems>

* fix(workspaces): some query stuff

* fix(workspaces): mutate cache instead of refetch

* fix(workspaces): more adjustments to gql query and fragment structure

* fix(workspaces): queries, style, structure

* fix(workspaces): match discoverability with current styles

* chore(workspaces): lint lint lint

* fix(workspaces): got it twisted

* chore(workspaces): fix test

* fix(workspaces): route to joined workspace on join

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
Co-authored-by: Chuck Driesler <chuck@speckle.systems>
Co-authored-by: Alessandro Magionami <alessandro.magionami@gmail.com>
2024-08-26 13:33:16 +02:00
Alessandro Magionami c56821ff4a Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-957-update-webhook 2024-08-23 14:41:09 +02:00
Iain Sproat acd83653a2 feat(graphql/serverinfo): provide maximum object size in bytes (#2734)
* feat(graphql/serverinfo): provide maximum object size in bytes

* Places config values in a ServerConfiguration object
- updates blobstorage to use ServerConfiguration, while retaining backwards compatibility
2024-08-23 13:06:22 +02:00
Alessandro Magionami b0a64af835 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-957-update-webhook 2024-08-22 15:08:20 +02:00
Chuck Driesler 63735eb044 feat(workspaces): work(space) invader default logos (#2708)
* feat(workspaces): add default logo index

* Added WorkspaceAvatar component

* Added WorkspaceAvatar component

* Fix issues

* Fix Avatar

---------

Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
2024-08-21 13:53:37 +01:00
Alessandro Magionami 14b91eb4e1 chore(webhooks): update webhook function refactor 2024-08-20 16:16:31 +02:00
Kristaps Fabians Geikins e4cc0cbc83 fix(workspaces): add email to existing account workflow bugfix (#2703)
* fix(fe2): properly handling invitedTeam auth error

* fix(fe2): disable invite dialog if not workspace admin

* fix(useremails): fix for default primary:true when creating new emails

* test fix
2024-08-20 15:45:34 +03:00
Kristaps Fabians Geikins 0b417c9ba0 feat(fe2): workspace invite cancel/resend + Invite dialog CTA in workspace home (#2691)
* feat(server): resend invite mutation

* invite resend/cancel from FE

* functional invite cta on workspace page
2024-08-20 10:17:42 +03:00
Kristaps Fabians Geikins 2bb7802fb9 feat: accept & decline workspace invite as a registered member (#2675)
* abstract base invite banner

* WIP banner actions

* WIP modify obj

* minor fix

* invite accept/decline cache mutations

* banner accept/decline basically works

* new block for accepting workspace invite

* WIP wrong account flow

* login/registration block changes

* add email invite related changes

* add new email FE

* add email w/ invite works

* final adjustments

* minor fixes

* addressing cr comments

* no-FF support

* extra workspace ff checks
2024-08-19 13:01:25 +03:00
Alessandro Magionami 73e28d72c6 Alessandro/web 957 refactor webhooks module (#2664)
* chore(webhooks): fix test failing when running alone

* chore(webhooks): create domain types and repository

* chore(webhooks): create webhook refactor multiregion

* chore(webhooks): triggers field is required in graphql schema
2024-08-19 09:23:27 +02:00
Kristaps Fabians Geikins 301da423ff chore(server): move workspace leave resolver (#2670)
* chore(server): move workspace leave resolver

* workspacesCore fix
2024-08-16 12:39:30 +03:00
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
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
Gergő Jedlicska 72017c3f2f feat(emailVerification): add email verification mutation for all emails (#2606) 2024-08-08 07:07:26 +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
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
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 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 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