Uncategorized permissions

(sati) #1


Are there no permissions for the ‘uncategorized’ category or am I missing something?

I have removed all the categories from my forum as there really isn’t a requirement for them, I also then moved all posts to ‘uncategorized’ but now nobody can reply to any posts as there seems to be missing permissions and there is no ‘Security’ settings for the uncategorized category.
Am I overlooking something?

(PJH) #2

That’s the only setting I know about, and for you it should be (default) checked.

(sati) #3

I have that checked - there is no issue in creating a topic in the uncategorized section but nobody apart from admins are able to reply to those topics. Shouldn’t there be a ‘Security’ section for the uncategorized settings?

(PJH) #4

I’ve never noticed it. With that box unchecked the category has the fa-group icon indicating it’s restricted, but yours doesn’t so unsure why there’d be a restriction (see below)…

What message are you/users getting when trying to reply?

(Jens Maier) #5

Nope, this was changed a while ago. The ACL for the uncategorized category should not be changed or some stuff breaks, so the permissions UI was removed.

How old is your Discourse instance? Did you ever change the category’s security settings before?

(sati) #6

There are no messages - there is just no reply button displayed unless you’re an admin on the forum.

The instance has been up for a while but I frequently update so it as up-to-date as possible and the settings of ‘uncategorized’ have never been previously changed. However due to decreased traffic to the forum there is little point in the forum having separate categories so I migrated all the topics to ‘uncategorized’ and removed the existing categories. As a result, nobody can now reply to any of the topics, creating topics isn’t an issue due to the aforementioned setting (‘Allow topics to be created without a category’) - but what is the point in this setting if nobody can reply to the uncategorized topics?
Furthermore - if the permissions of the ‘uncategorized’ category were removed, how is it then possible or feasible to run a category-less forum?

(sati) #7

Also is there a bug (on meta.discourse.org atleast) that is only showing one user per topic list (regardless of how many participants) on the topic listings? I’ve noticed this thread and others are just showing one user when there have been several replies from different users…

(Jens Maier) #8

The uncategorized category doesn’t need permissions. If it’s enabled in the site settings, everyone can view it, create topics and reply. If it’s disabled, it’s completely disabled.

Anyway, if this really is a permissions problem, which I’m not convinced of, you could fix it manually through the Rails console:

Category.find(1).update(read_restricted: false)
CategoryGroup.find_by(category_id: 1).each(&:destroy)

Restart Discourse to flush caches, reload the page.

(sati) #9

The first command runs ok but the second one produces this error:

NoMethodError: undefined method `each’ for #CategoryGroup:0x00000007f5bbb0

And there is still no reply button for topics listed in the uncategorized category.

Also any changes I make in the following settings are not saved:

But if I rename or change the color of the category, those settings are saved.

(Jens Maier) #10

Whoops, I goofed.

id = Category.find_by(name: "uncategorized").id
CategoryGroup.where(category_id: id).each(&:destroy)

Replace the string "uncategorized" with your uncategorized category’s name if necessary.

(sati) #11

That seemed to resolve it, thank you for your assistance. :slight_smile:

(Jens Maier) #12

Good to know.

@sam, since the UI has been removed, shouldn’t there at least be a migration that resets the uncategorized category’s permissions and read_restricted status to defaults?

(Sam Saffron) #13

yes, there should cc @neil