Fixed duplicate code that causes additional SQL queries.
This commit is contained in:
parent
2f5ce86d28
commit
e9bbff97a9
1 changed files with 0 additions and 2 deletions
|
@ -133,8 +133,6 @@ module HasGroups
|
|||
#
|
||||
# @return [Array<Group>] Groups the instance has the given access(es) to.
|
||||
def groups_access(access)
|
||||
return [] if !active?
|
||||
return [] if !groups_access_permission?
|
||||
group_ids = group_ids_access(access)
|
||||
Group.where(id: group_ids)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue