When adding groups to a category, the options anonymous_users and logged_in_users can be selected, but they don’t work.
Does this not require the beta feature “Granular anonymous and logged in groups permissions” to be enabled?
@martin any ideas about this one?
Thanks for the report, will have a look ![]()
From your response in the other topic
The more I think about this the more I worry about this.
What happens if I only add anonymous_users to a category and don’t add logged_in_users ?
What happens if I add anonymous_users while my forum is login_required ?
Also, the current technical implementation is that when category permissions are set to everyone, there is simply no entry in category_groups and read_restricted is set to false.
That is very simple and straightforward: if there are no permissions set then the permissions are determined by the global forum permissions (the login_required setting) and no further restrictions apply.
So making this change would be adding a huge amount of complexity and weird combinations would be possible (you could do anonymous users and staff
)
My suggestion would be:
- remove
anonymous_usersas an option for category permissions altogether - keep
everyoneandlogged_in_users - remove
trust_level_0as an option since it equalslogged_in_users
or alternatively, but maybe less clear for less experienced admins
- remove
anonymous_usersandlogged_in_usersas an option for category permissions - keep
everyone(and TL0)
In all cases, keep everyone. And you won’t need a migration either ![]()
Thanks for your thoughts, this is why I didn’t want to go into category permissions too much at first with that everyone change ![]()
I think a lot of what you say here could simply be made impossible, I’ve already been working on some preliminary systems here with ACLs and a nicer permission UI on our kanban plugin that we are developing, here is an example, we intend to change the category permissions to use this eventually:
There are several rules involved here, like it’s impossible to give anonymous users Manager permissions for a kanban board and so on, and even supports mandatory permissions, like Admins can always manage a board.
We would make it so you can’t add anonymous users when the forum is login required.
Again, another validation/restriction we can add.
We could add validations/warnings for this kind of thing too.
This is what I want to avoid, these kind of implicit permissions that are everywhere in Discourse, rather than having logged in users + anonymous users explicitly always setup for a category if it’s public/not read restricted.
Anyway, for now I don’t want to get too deep into this, there’s a bit of a way to go before I deal with categories. But I do agree the OP is a bug that needs to be fixed in the interim, so I will still do this.
With that other issue in mind, I would personally recommend against that kind of logic. What happens when I change a forum to login required when anonymous users are already in the permissions list? And the other way around? This is going to be a nightmare, and it will be non transparent to admins.
I am very wary of complexity like this.
Again, more good points, there is a lot to think through and this stuff is tricky. I will be for sure keeping the admin experience in mind when making changes around categories, there is a lot of history here and I don’t want anyone to be surprised. None of this will be done quickly, it will take a long time to carefully work through the different scenarios when I get to this project.
I wonder why the fact that you can configure stuff for anons while not for logged in users is a problem in the context of category permissions, but not in the context of permissions configured via site/plugin/theme settings. A simple example: it is now possible to make styleguide available to anonymous_users without adding logged_in_users. Does that make more sense than showing a category to anons, but not logged in users?
Nope doesn’t make sense, just another edge case to cover really…will add anonymous_users to disallowed_groups for that plugin. Also highly doubt there are many sites in the wild with this plugin enabled, so not too worried about this being misconfigured at the moment.
I think that’s how I would generally handle this with these type of settings. We can also make use of the mandatory_values to make sure certain groups are always selected so you can’t end up with only anonymous_users in some places. Or make use of setting validations to say “you can’t choose anonymous_users without at least one authenticated user group”, and so on.
I don’t understand why this is needed. What is wrong with it being an option?
Does that work only for site settings, or also for theme components?
Doesn’t work yet for theme components, but it could. Again, really getting ahead of ourselves here.

