Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add second (non-admin) default user to "initial data" trigger #6666

Merged
merged 7 commits into from
Dec 5, 2022

Conversation

philippotto
Copy link
Member

Testing permission-related functionality often requires a user which doesn't have admin rights. Setting that user up is relatively tedious (especially on dev instances) and I don't see a reason why there shouldn't be a second default user by default (of course, only when sampleOrganization == true). Since the same password is used for both default users, one only needs to adapt one character in the email to log into the other account.

@fm3 What do you think about this? The config doesn't read as elegant as before, but I think the gains are worth it. Configuring another password for the second user didn't seem worth it to me, on the other hand.

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:


  • Ready for review

@philippotto philippotto self-assigned this Nov 29, 2022
@philippotto philippotto requested a review from fm3 November 29, 2022 12:54
@philippotto philippotto changed the title Add second (non-admin) user to "initial data" trigger Add second (non-admin) default user to "initial data" trigger Nov 29, 2022
Copy link
Member

@fm3 fm3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, makes sense.
Two suggestions

  • Maybe use a different full name for this user so that the initials wk displays at the top-right are discernible from those of Sample User.
  • Maybe insertDefaultUser can be parameterized to avoid duplicating basically the whole method?

@philippotto philippotto enabled auto-merge (squash) December 5, 2022 08:05
@philippotto philippotto merged commit d7c9616 into master Dec 5, 2022
@philippotto philippotto deleted the second-default-user branch December 5, 2022 08:25
hotzenklotz added a commit that referenced this pull request Dec 6, 2022
…cing

* 'master' of github.com:scalableminds/webknossos: (23 commits)
  Guard against invalid-mag bucket volume save actions (#6660)
  Add OIDC authentication (#6534)
  Add second (non-admin) default user to "initial data" trigger (#6666)
  Fix and improve miscellaneous things in Folders tab (#6674)
  Improves mag and voxelSize inferral for remote datasets (#6670)
  Squashed commit of the following:
  Fix import of N5 datasets by adding n5 schema to frontend validation (#6668)
  Virtual Folder Structure for Datasets (#6591)
  Ability to recover from webGL context loss (#6663)
  Fix assertion that referenced teams cannot be deleted (#6664)
  fix task summary with pending jobs (#6662)
  Only allow taskTypeId as parameter in task creation (#6640)
  Release 22.12.0 (#6661)
  Create Annotation From View Mode: Keep Activated Mapping (#6647)
  Workaround to avoid false-positive version warning (#6656)
  Fix WK-lib download snippet (#6605)
  Use LZ4 with WASM for volume saving/undo/redo (#6652)
  Fix version number extraction when building docker image (#6655)
  Pass mapping name to precompute meshes (#6651)
  Deduplicate bboxes when importing NML (#6648)
  ...
philippotto added a commit that referenced this pull request Dec 13, 2022
* Add second (non-admin) default user to "initial data" trigger (#6666)

* add second (non-admin) user to initial data trigger

* rename second user and DRY insertion method

* format

* name default organization team "Default" when inserting initial data (analoguous to general organization creation)

* Add OIDC authentication (#6534)

Co-authored-by: Florian M <[email protected]>
Co-authored-by: Philipp Otto <[email protected]>

* Guard against invalid-mag bucket volume save actions (#6660)

* [WIP] guard against invalid-mag bucket volume save actions

* avoid unnecessary creation of objects in ResolutionInfo instances

* use layer's resolution info when in wkstore adapter

* rename bucketPositionToGlobalAddress to bucketPositionToGlobalAddressOld

* get rid of bucketPositionToGlobalAddressOld

* rename bucketPositionToGlobalAddressNew to bucketPositionToGlobalAddress

* simplify getBucketExtent signature

* fix tests

* fix quick-select tool for scenarios where the color layer is available in the current mag but the volume layer isn't

* Update frontend/javascripts/test/model/binary/layers/wkstore_adapter.spec.ts

* avoid losing error chain during conversion

Co-authored-by: Philipp Otto <[email protected]>
Co-authored-by: Philipp Otto <[email protected]>

* Provide valid JSON schema (#6642)

extra `{}` cause JSON decode error in python standard JSON library and webknossos instance

Co-authored-by: Philipp Otto <[email protected]>

* Improve layout of dashboard

* Swagger annotation for shortLinkByKey (#6682)

* Bump qs from 6.5.2 to 6.5.3

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.5.2...v6.5.3)

---
updated-dependencies:
- dependency-name: qs
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Philipp Otto <[email protected]>
Co-authored-by: frcroth <[email protected]>
Co-authored-by: Florian M <[email protected]>
Co-authored-by: Florian M <[email protected]>
Co-authored-by: Philipp Otto <[email protected]>
Co-authored-by: erjel <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants