Added restriction to group policy. Create link hidden for non-pro.

This commit is contained in:
2458773093
2019-08-01 19:46:17 +03:00
parent 8c837a0c36
commit 3fa8eb1bac
3 changed files with 10 additions and 2 deletions

View File

@@ -33,6 +33,8 @@ class Api::V1::GroupsController < Api::BaseController
end
def create
authorize :group, :create?
@group = Group.create!(group_params.merge(account: current_account))
render json: @group, serializer: REST::GroupSerializer
end