Commit Graph

847 Commits

Author SHA1 Message Date
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
Kristaps Fabians Geikins 0085bab1db fix(server): fixed various email lookups/updates being case sensitive (#2595)
* fix(server): case insensitivity in userEmails repo

* minor fix

* more test improvements + user repo tests

* more tests

* test fixes
2024-08-07 17:48:01 +03:00
Iain Sproat b03e79ae44 chore(logging): improve logging around passportjs strategies (#2593)
- ensures the request logger, containing request details, is used
2024-08-07 13:34:49 +01:00
Iain Sproat d9f9da77f4 chore(readiness): server pods are not ready if no free db connections (#2552)
- adds high frequency metrics for knex connections
2024-08-07 11:07:34 +01:00
Kristaps Fabians Geikins 99edb378ed feat: auth issue troubleshooting related improvements (#2591)
* fix(server): TS passportService + fixed user input error reporting

* feat(fe2): add server req id to error reference
2024-08-07 12:52:26 +03:00
Kristaps Fabians Geikins 50b5bdbbdd chore(server): typescriptified auth strategies (#2589)
* rebuilt strategies.js

* local.js -> local.ts

* oidc.js -> oidc.ts

* google.js -> google.ts

* github.js -> github.ts

* azure-ad.js -> azureAd.ts

* minor fixes

* FE2 regen

* improved error reference page

* minor adjustment

* more error page improvements

* migrated helper

* testfix
2024-08-07 11:38:44 +03: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
Alessandro Magionami c365c0566e Alessandro/web 1169 create app validation to enforce only one primary email per (#2576)
* 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): add validation for unique primary email

* 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): rely on knex trx for transaction handling

* chore(useremails): fix checkemail not present

* chore(useremails): add tests

* chore(useremails): create check function

* chore(useremails): use repository function to find primary email

* chore(useremails): fix prettier

---------

Co-authored-by: Gergő Jedlicska <gergo@jedlicska.com>
Co-authored-by: Kristaps Fabians Geikins <fabis94@live.com>
2024-08-06 12:34:48 +02: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
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 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
Alessandro Magionami f5b262f4ea Merge pull request #2562 from specklesystems/alessandro/web-1533-fix-unique-values-in-seed
chore(seed): fix seed using library to generate unique values
2024-08-02 11:35:49 +02:00
Kristaps Fabians Geikins 2fb1ced647 feat(fe2): show reqId in error pages (#2565)
* feat(fe2): show reqId in error pages

* better text size class
2024-08-02 12:05:11 +03:00
Iain Sproat 1c048b4111 refactor(server): use env helper to consistently find max connections (#2563) 2024-08-01 17:24:17 +01:00
Alessandro Magionami 221cd55753 chore(seed): fix seed using library to generate unique values 2024-08-01 17:26:27 +02:00
Chuck Driesler b7c281961c fix(workspaces): match workspaces and workspacesCore resolvers (#2560) 2024-08-01 16:48:08 +03:00
Alessandro Magionami 8b43790bed Merge pull request #2519 from specklesystems/alessandro/web-1172-change-the-users-repository-to-abstract-the-email-field-in
Alessandro/web 1172 change the users repository to abstract the email field in
2024-08-01 15:14:34 +02:00
Alessandro Magionami fcedff2565 chore(useremails): add failsafe option to scan table 2024-08-01 14:30:25 +02:00
Iain Sproat b002df6cd4 feat(server/logs): add request ID to objects retrieval log messages (#2550) 2024-08-01 12:21:05 +01: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
Alessandro Magionami 42b56751d3 chore(useremails): add failsafe to scantable 2024-08-01 09:50:50 +02: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
Alessandro Magionami 21e56b13ab chore(useremails): remove unsued imports 2024-07-31 11:57:06 +02:00
Alessandro Magionami ebf29014bd Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-1172-change-the-users-repository-to-abstract-the-email-field-in 2024-07-31 10:51:02 +02:00
Alessandro Magionami 9ffe6ddc21 chore(useremails): minor cleanup for users repository 2024-07-31 10:50:55 +02:00
Alessandro Magionami e43ba68001 chore(useremails): add logging in backfill migration 2024-07-31 09:51:30 +02:00
Kristaps Fabians Geikins 2e7f1578b1 fix(server): commit query not returning author id as expected by resolvers (#2549) 2024-07-31 10:28:04 +03:00
Alessandro Magionami 3f7d3347d4 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-1172-change-the-users-repository-to-abstract-the-email-field-in 2024-07-30 14:46:55 +02:00
Kristaps Fabians Geikins 281f77ac11 fix(server): some serverinvites regressions (#2538)
* project invite retrieval

* fix for invalid invite target when inviting registered user by email

* improved error msg w/ broken streamId
2024-07-29 19:15:26 +03:00
Alessandro Magionami 9cde0999a6 Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-1172-change-the-users-repository-to-abstract-the-email-field-in 2024-07-29 16:08:46 +02: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 fcabd93cff fix(server): ability to reset mock store 2024-07-29 11:38:08 +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
Alessandro Magionami d10fd393df chore(useremails): fix tests 2024-07-25 17:26:29 +02:00
Alessandro Magionami c7bcf5210f chore(useremails): code review changes 2024-07-25 15:20:41 +02:00
Alessandro Magionami 862e21fb9b Merge branch 'main' of github.com:specklesystems/speckle-server into alessandro/web-1172-change-the-users-repository-to-abstract-the-email-field-in 2024-07-25 15:09:55 +02:00
Alessandro Magionami dc70f2d160 chore(useremails): create scan table helper 2024-07-25 15:09:41 +02:00
Alessandro Magionami a7fe3ca3e4 chore(useremails): use table helper for primary key 2024-07-25 15:09:19 +02: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
Alessandro Magionami 31661071ba fix(useremails): fix login with primary email 2024-07-24 17:17:37 +02:00
Alessandro Magionami 80484a4328 chore(useremails): fix linter 2024-07-24 16:01:22 +02:00
Alessandro Magionami 618d65867a chore(useremails): create helper for search query 2024-07-24 11:16:19 +02:00
Alessandro Magionami 7c41ee0047 chore(useremails): fix count users and getusers to use user emails table 2024-07-23 15:56:26 +02:00