# visibility\_level 'owner' のグループは、スタッフには表示されません

**URL:** <https://meta.discourse.org/t/groups-with-visibility-level-owner-are-not-visible-for-staff/122963>\
**Category:** Bug\
**Created:** [2019 年 7 月 15 日午前 11:31 UTC](https://meta.discourse.org/t/groups-with-visibility-level-owner-are-not-visible-for-staff/122963 "2019-07-15T11:31:15Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2019 年 7 月 15 日午前 11:31 UTC](https://meta.discourse.org/t/groups-with-visibility-level-owner-are-not-visible-for-staff/122963/1 "2019-07-15T11:31:16Z")

</div>

可視レベルが `owner` のグループは、スタッフには表示されないようです。

可視レベル `staff` は（`join` の代わりに `left join` を使用し、追加の `where` 句を設けることで）可視性を保証する仕組みを提供していますが、可視レベル `owner` にはそのような仕組みがありません。

> **[Blaming discourse/app/models/group.rb at stable · discourse/discourse](https://github.com/discourse/discourse/blame/stable/app/models/group.rb#L122-L134)**
>
> A platform for community discussion. Free, open, simple. - Blaming discourse/app/models/group.rb at stable · discourse/discourse

（ふむ、GitHub ソースのワンボックス化がもう機能しなくなった？）

```
  SELECT g.id FROM groups g
  LEFT JOIN group_users gu ON gu.group_id = g.id AND
                         gu.user_id = :user_id AND
                         gu.owner
  WHERE g.visibility_level = :staff AND (gu.id IS NOT NULL OR :is_staff)
  UNION ALL
  SELECT g.id FROM groups g
  JOIN group_users gu ON gu.group_id = g.id AND
                         gu.user_id = :user_id AND
                         gu.owner
  WHERE g.visibility_level = :owners

```

これは意図的なものでしょうか？

---

_[View the full topic](https://meta.discourse.org/t/groups-with-visibility-level-owner-are-not-visible-for-staff/122963)._
