FEATURE: Group category permissions tab (#10388)

This commit is contained in:
Mark VanLandingham
2020-08-10 09:49:05 -05:00
committed by GitHub
parent b44748e503
commit b7a092bd28
12 changed files with 164 additions and 14 deletions

View File

@ -546,6 +546,12 @@ class GroupsController < ApplicationController
render_serialized(groups, BasicGroupSerializer)
end
def permissions
group = find_group(:id)
category_groups = group.category_groups.select { |category_group| guardian.can_see_category?(category_group.category) }
render_serialized(category_groups.sort_by { |category_group| category_group.category.name }, CategoryGroupSerializer)
end
private
def group_params(automatic: false)