FIX: Group owners should be able to invite users to their groups.

https://meta.discourse.org/t/group-owner-cannot-send-an-invite-to-a-group/60617/12
This commit is contained in:
Guo Xiang Tan
2017-07-21 15:12:24 +09:00
parent fe05587134
commit 2a17f1ccd7
18 changed files with 256 additions and 114 deletions

View File

@ -1,19 +1,4 @@
class Admin::GroupsController < Admin::AdminController
def index
groups = Group.order(:name).where("groups.id <> ?", Group::AUTO_GROUPS[:everyone])
if search = params[:search].to_s
groups = groups.where("name ILIKE ?", "%#{search}%")
end
if params[:ignore_automatic].to_s == "true"
groups = groups.where(automatic: false)
end
render_serialized(groups, BasicGroupSerializer)
end
def show
render nothing: true
end