Allow admins to choose if groups are visible or not.

This commit is contained in:
Robin Ward
2014-04-22 16:43:46 -04:00
parent 8538e31fb4
commit af877781b7
11 changed files with 43 additions and 19 deletions

View File

@@ -20,6 +20,7 @@ class Admin::GroupsController < Admin::AdminController
group.alias_level = params[:group][:alias_level]
group.name = params[:group][:name] if params[:group][:name]
end
group.visible = params[:group][:visible] == "true"
if group.save
render json: success_json
@@ -32,6 +33,7 @@ class Admin::GroupsController < Admin::AdminController
group = Group.new
group.name = params[:group][:name].strip
group.usernames = params[:group][:usernames] if params[:group][:usernames]
group.visible = params[:group][:visible] == "true"
if group.save
render_serialized(group, BasicGroupSerializer)
else