Erudika / scoold

A Stack Overflow clone for teams (self-hosted or hosted)
https://scoold.com
Apache License 2.0
862 stars 239 forks source link

Can see two default spaces which leads to inconsistent questions list on the landing page #368

Closed ajz007 closed 1 year ago

ajz007 commented 1 year ago

When I launch the app on my local environment I can see two default spaces named as - 'default' and 'Default Space' I believe only 'Default Space' should be available.

image

Please note that the database only has one entry for default for type { type: 'scooldspace'}

image

Steps to replicate:

Windows 10 Pro, Chrome Version 110.0.5481.104

  1. Clone Para latest master, build, start with Mongo DB
  2. Setup another app called myapp -- para-cli new-app "myapp" --name "My App"
  3. Clone scoold latest master
  4. Open http://localhost:8000
  5. Create a new user (without OAuth). Login with this user
  6. Click on Spaces. This shows two default space -- 'default' and 'Default Space' which is confusing

Possible code issue: ScooldUtils.assignSpacesToUser --> authUser.getSpaces().addAll(assignedSpaces); image

The problem is that authUser.getSpaces() returns a DEFAULT_SPACE and assignedSpaces also contains a default space

albogdano commented 1 year ago

I believe this was fixed in Scoold 1.52.1. Please confirm you are running the latest stable version.

ajz007 commented 1 year ago

ohh.. my bad then. I am testing in 1.52.0 I can check again on the latest version.

ajz007 commented 1 year ago

I checked this again in the latest version 1.52.1 and I can see the same behavior image

albogdano commented 1 year ago

Fixed, thanks!