Skip to:

Opened 3 months ago

Closed 6 weeks ago

#7608 closed enhancement (fixed)

Use BP_Groups_Group visibility and access properties.

Reported by: dcavins Owned by: djpaul
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.0
Component: Groups Keywords: has-patch commit
Cc: dcavins


When checking visibility for the current user, use the is_visible property in BP_Groups_Group rather than calculating it again. Similarly, use the user_has_access property when checking access to a group. (is_visible was introduced in 2.9.)

Attachments (1)

7608.01.diff (3.1 KB) - added by dcavins 3 months ago.
Use BP_Groups_Group properties in some cases.

Download all attachments as: .zip

Change History (4)

3 months ago

Use BP_Groups_Group properties in some cases.

#1 @DJPaul
7 weeks ago

  • Keywords commit added

If ->is_visible handles both private and hidden groups correctly for this change, go for it.

#2 @DJPaul
6 weeks ago

Yes it does.

#3 @djpaul
6 weeks ago

  • Owner set to djpaul
  • Resolution set to fixed
  • Status changed from new to closed

In 11761:

Groups: use class methods to check if user has visibility of a group.

Improves upon existing duplication of logic.

Fixes #7608

Props dcavins

Note: See TracTickets for help on using tickets.