CSS classes for current groups who can view topic?

Continuing the discussion from CSS classes for current user's groups:

As the forums I build have more and more complex privacy settings, I really like the idea of making it more visible to people who can see what is being posted.

I like this concept, Display Posts Visibility, and wish I could take it further to show exactly which groups can see which topics.

Right now, Display Posts Visibility uses .archetype-regular and .archetype-private_message to show fully public vs fully private messages, but uses .read-restricted to show the ones that are restricted by groups. But since .read-restricted is not precise, it seems hard to figure out which groups can view the current topic.

If the CSS classes were there for which groups can see it, then it’d be a lot easier to style the page to make it more obvious to people.

Maybe it’s a simple theme component, like CSS Classes for Current User's Groups, but I can’t seem to find something in the discourse/app/assets/javascripts/discourse/app/lib/plugin-api.js at 99a6f32554e43a15da491c0e4db28a3537e98358 · discourse/discourse · GitHub to get the current groups that are able to view the topic.

Any ideas?

3개의 좋아요

Groups that can see a topic are considered private information, so leaking that a group has access to a certain category is considered a bug in Discourse.

This means that you will need a plugin in order to expose this information to the UI.

3개의 좋아요

플랫폼에 존재하는 숨겨진 그룹들을 많이 노출시킬 수 있고, 그 외에도 여러 이유가 있을 수 있으므로 그런 일이 일어날 수 있다는 점은 이해할 수 있습니다.

반대로, 특정 카테고리에 접근 권한이 있는 그룹을 사람들이 알 수 없도록 하는 것이 사생활 침해로 간주될 수도 있다는 점도 이해할 수 있습니다. 예를 들어, Contribute > Feature 카테고리에 게시물을 작성할 때, 그것이 "제한됨"이라고 표시되어 있다면 Feature 그룹의 다른 사용자만 볼 수 있다는 의미일 수도 있고, 플랫폼의 모든 사용자가 여전히 볼 수 있지만 특정 그룹만 주제나 답변을 생성할 수 없다는 의미일 수도 있습니다. Meta와 같이 대부분 공개적인 포럼의 경우, 우리가 작성하는 대부분의 내용이 공개된다고 가정하므로 큰 문제가 아닐 수 있지만, 더 비공개적인 대화를 호스팅하는 것에 대해 생각하다 보면 "도대체 누가 내가 작성하는 내용을 볼 수 있는 거지?"라는 점에 대해 더 민감해집니다.

어쨌든, 현재는 불가능하지만 플러그인을 통해 가능하다는 것을 알려주셔서 감사합니다 :pray:

3개의 좋아요