Non-staff users are able to access uncategorized even when disabled

While researching https://meta.discourse.org/t/cant-prevent-creation-of-uncategorized-topics/104874/7, I found that users can view Uncategorized even if it is disabled via site setting and has no topics within it. Users can visit it by navigating directly /c/uncategorized, as well as by searching in the category filter dropdown:

image

The New Topic button is on the (empty) page, and lets them start composing without selecting a category, which shouldn’t be possible with the setting off. The composer should look like this:

5 Likes

Maybe we regressed here @joffreyjaffeux? Not sure.

1 Like

I don’t think we regressed here.

1 Like

Fine with me.

What about this? It seems like a regression to me - with Uncategorized disabled users should be required to select a category before composing the body. However they are able to compose the body without a category if they click new topic from the uncategorized page.

Yes I fixed what was very easy for me. Need to think about the composer, if you thought we absolutely had to remove the URL, then it was solved with it. Maybe I should just redirect. Need to dig more, uncategorized has many cases and I’m unsure what this would cause.

3 Likes

What did we want to do with this @joffreyjaffeux?

2 Likes

I can confirm this bug is still there. You will not see uncategorized category in search but if you access thru link it shows.

https://yourdiscoursesite.com/c/uncategorized

1 Like

@codinghorror anyone looking into this?

That’s… not a bug though. The OP stuff, @joffreyjaffeux I am sure is looking at.

4 Likes

I feel it is a bug.
If I access “staff” or “lounge” category it shows “Oops! That page doesn’t exist or is private.”

but for “uncategorized” it shows “There are no more Uncategorized topics.” I deleted all topics otherwise it shows those topics.

Sure because those are private categories.

It’s not a bug, nor is it the subject of this topic.

1 Like

For the purposes of the bug category, there is a specific definition:

That is unexpected behaviour, but it is not a bug.

3 Likes

It think that should be a decent fix:

Didnt write a test because it seems we currently have nothing “uncategorized” related in the js test suite.

3 Likes

Close this @jomaxro if you feel it is good now.

1 Like