新类别权限——"无法查看"/"排除"

I would like to support this. My use case - I have a group of “limited” users; I want them to be able to read most categories, but write only in one, let’s call it “starting cat.”.
I can of course use existing solution (and trust levels of course), but if I want to have more fine-grained permission system, it gets hectic.
Instead of setting up permissions like this:

display: everyone
post: everyone NOT greenhorns

I have to do something like this:

display: everyone
post: Group 1
      Group 2
 (...and basically each and every other group...)
reply: Group a
       Group b
(...and once again...)
3 个赞

@hawk this post was moved into community when someone misunderstood my request

I think this appears to have some support enough to justify it moving to either support or possibly feature - do you agree?

1 个赞

@robmc, looks like Jeff recategorized this already. Unless I’ve misread this, your request is the same as mine (linked above, long before I joined the Discourse team). Do you mind if the topics are combined, or do you feel yours is different?

2 个赞

Well, our use cases are similar, but our current proposed solutions look a little different

I don’t mind combining them at all, but I think that your original proposal was to have a single category for putting members into that would stop them being in ‘everyone’ but I would prefer to have logic in the security that allowed us to use “IS NOT” (or can’t / exclude) in the same way we use “IS” (or Can) as I think this would give more flexibility

They are similar issues, but not quite the same and it is possible that a single technical solution would address both, but I’m not sure. Happy to put them together to explore it though

I’m not precious … just wanting to help make this even better for everyone

1 个赞

So my usecase at the time was a single category that I needed to restrict access to, but the solution is the same as you suggested: an “exclude” or “not” security permission for categories.

2 个赞

SOLD!

:slight_smile:

Happy to join forces in that case

2 个赞

I wiki-ed the OP. Feel free to add/edit anything you’d like.

1 个赞

Having Add+Subtract moves the system into a whole range of potential conflicts requiring resolution. At the least, the order of putting in permissions will now be significant, and so there will necessitate a reorder function to move things up/down.

Otherwise, there is no way to resolve potential conflicts when a person:

  • is in more than one group
  • one group is permitted access
  • another group is denied access

EDIT: Or you can say Add always trumps Subtract, or vice versa. Nevertheless, it makes things very hard to understand.

Although I can understand the pain you’re going through in order to request this… I have tons and tons of groups and each category’s permissions list is like 15 long, just to do what you’re looking to do – that is, to exclude a particular group from access while opening to most others.

2 个赞

Indeed, the order will matter

Since all sites are currently like yours, it might be that the solution is to have two steps / sections … the first is the INCLUSION (which is the current context, so even if the change is made nothing is affected) where you build up a total population to view this, then a second step below would be the EXCLUSION which would remove a portion of those that matched certain criteria.

5 个赞

There is also a need for intersection, meaning that the permission is only for users with two or more groups set.

For example, Sales & USA ==> any user having both the group Sales and USA. Then this combo should have access to USA Sales Leads category. In other words, the group is the “intersection” of a number of groups. Currently, the permission system works on the “union” of listed groups.

This will solve neatly the common headaches of setting up permission with sub-categories (where in many cases, the users permitted into the sub-categories will only be among the ones permitted into the parent category). It is necessary because, in Discourse, sub-categories do NOT inherit permissions.

2 个赞

我也很希望有一个排除选项,而且可能很简单:只需允许我们在类别的安全设置中添加一个组,然后取消选中“查看”框。

现在,如果我在类别安全设置中添加了一个组,我可以取消选中“创建”和“回复”框,但不能取消选中“查看”框。如果我能取消选中“查看”框,那么逻辑似乎可以是“如果用户属于任何没有查看权限的组,则不允许用户查看该类别”。

这让我想知道当前的权限冲突是如何工作的:如果一个用户属于组 A 和组 B,并且组 A 可以在该类别中创建主题,但组 B 不能,那么用户可以在该类别中创建主题吗?换句话说,哪个优先?

我假设它现在的工作方式是“如果用户属于任何具有 X 权限的组,则授予用户该权限”,但我不太确定……我刚测试过,似乎确实如此。

1 个赞

权限实际上是累积的,从这个意义上说,不存在冲突。最高继承权限始终获胜。我可以被添加到允许我查看某个类别的组中,也可以被添加到允许我贡献的另一个组中。

除非你通过其他成员身份明确授予了访问权限,否则为什么需要排除某个组?

我认为最简单的例子是为所有人提供查看、回复和创建权限,然后添加组 X 并取消选中查看、回复和创建,这样除了组 X 的成员之外,所有人在该类别中都可以查看、回复和创建。

这可能如何应用于我目前的情况:我在 Discourse 和 WordPress 上使用 Memberful 作为 SSO 提供商,我想销售三个套餐,其中两个更贵的套餐可以访问论坛,最低的套餐则无法访问。但是,我认为他们仍然可以因为跨 SSO 同步帐户而获得访问权限,因此我想限制他们的访问权限,让他们看不到任何类别,也许只能给我发送私信。我认为可以通过将组 Y 和组 Z 添加到所有类别而不是所有人来做到这一点,而且这很有效,因为我没有很多组,但我认为如果我有很多组,取消选中“查看”框会更容易。

1 个赞

我也希望能够设置小型群组,并将其排除在网站的某些类别之外,但允许他们像正式会员一样查看其他类别。

为了使用上面的 Slack 对比,请将该小型群组中的人员设置为“多频道访客:这些账户只能访问选定的频道”。

简而言之,我希望能够将群组排除在个别类别之外。

1 个赞

各位——可以帮我检查一下这个想法吗?

我认为我可能已经想出了一种基于现有功能实现类似目标的方法。

假设我想让被标记为“secret”的任何主题对某个特定群组不可见。

这是否可以通过更改群组的设置,使得被标记为“secret”的任何主题对群组成员静音来实现?

同样,如果我想让某个分类对某个特定群组不可见,这是否可以通过更改群组的设置,使得该分类中的任何主题对群组成员静音来实现?(并且还安装 Hide Muted Categories 主题组件)?

另外——我找不到任何描述 Discourse 静音功能如何工作的文档——有人能帮忙吗?

这些主题有多秘密?当你默认静音某些内容时(对所有人或某个组的成员),用户仍然可以编辑他们的偏好设置来取消静音。此外,被静音的主题会隐藏在主题列表中,但不会隐藏在搜索结果中。

2 个赞

好的,那行不通 :frowning: