Ban single Users from Category

NodeBB Development
  • Good morning,

    I'm looking for a way of banning a single user from one specific category.
    So far it looks like the permission system only has two states, allowed or undefined, but no forbidden.

    I tried different things:

    • Adding that user on the category permissions directly, removing everything except Find/Access, but then the permissions for registered-users kick in and allow writing again.
    • Adding a second group with that user to that category with limited permissions - see above, same problem
    • Same as previous option, but with removing that user from registered-users - works but...

    ... we have round about 150 categories, adding a new group to all of them is a lot of work. Also I'm not sure if removing a user from registered-users is a good idea.

    Is there a nicer way to reach my goal?

  • @Florian-Müller Unfortunately, privilege are additive, as you've discovered. This means if that troublesome user is in the registered users group, they can still access it.

    I'd recommend not removing them from that group 😄

  • @julian Do you see an easy/nice way how to solve this problem?

  • @Florian-Müller said in Ban single Users from Category:

    @julian Do you see an easy/nice way how to solve this problem?

    A not very practical way would be to create a group for each category. Unless you write a plugin or script to ease the pain of management it will be headache inducing.

Suggested Topics

  • 3 Votes
    2 Posts

    It has certainly improves the first impression of categories page.

  • 0 Votes
    3 Posts

    @baris Great ! Many thanks ! Exactly what I needed and it works (of course... 😉 ).

  • 0 Votes
    4 Posts

    Anyone knows if theres the possibility of registering an user link in the dropdown, that will be public only? Like the case for example of the "chat link", but registered vía filter:user.profileLinks hook.

    Since in that hook theres no user info, i cannot check if the user visualizing the page is the users itself that is visualizing his/her profile or if the user its logged in, to restrict the link registration.

    I want to implement the functionality of "ignore users" showing a link that can be used to ignore, unignore from the user profile. But it has no sense to show the link "ignore/unignore user" if it is the user itself or the user visiting the profile is not logged in.

    I know it can be easilly achived by adding one more attribute to the link object and modifying the menu.tpl with minor changes to reflect this behaviour (checking the new field), and without altering the existing behaviour of the theme. If the answer to the previous question is "no", what is needed to get a pull request including this behaviour accepted? Modification in all stable themes? (persona,lavender,vanilla?).
    Or would it be more suitable a request of a new action hook for action:user:viewProfile for example? To be able to make business logic checks with the data, and altering the content sent to the page for example?

    PS: Is there any way of contributing to document the list of hooks with a short explanation of each one? For example when they're fired and wich information do they send? I think it would be a good improvement for the documentation in order to make it easy to the plugin dev to without the need to dive into the core and check each hook one by one looking for one satisfying their needs. I wouldn't mind to throw 2/3 lines explaining the hooks I found useful that i'm seeing on my little plugin experiments from a noob perspective. Ping @administrators

    Thanks again and sorry for modifying the thread question.

  • 0 Votes
    5 Posts

    @psychobunny The problem is that with the ACP Post-section feature, you can only add more text, but you can't modify existing text.

  • User feedback issues

    NodeBB Development
    0 Votes
    2 Posts

    Responded here