Skip to content
Snippets Groups Projects

FE for share groups with groups

Merged Imre Farkas requested to merge if-share_groups_with_groups_fe into master
All threads resolved!
9 files
+ 113
43
Compare changes
  • Side-by-side
  • Inline
Files
9
@@ -3,6 +3,7 @@
class Groups::GroupLinksController < Groups::ApplicationController
before_action :check_feature_flag!
before_action :authorize_admin_group!
before_action :group_link, only: [:update, :destroy]
def create
shared_with_group = Group.find(params[:shared_with_group_id]) if params[:shared_with_group_id].present?
@@ -23,13 +24,11 @@ def create
end
def update
link = group.shared_with_group_links.find(params[:id])
link.update(group_link_params)
@group_link.update(group_link_params)
end
def destroy
link = group.shared_with_group_links.find(params[:id])
Groups::GroupLinks::DestroyService.new(nil, nil).execute(link)
Groups::GroupLinks::DestroyService.new(nil, nil).execute(@group_link)
respond_to do |format|
format.html do
@@ -41,6 +40,10 @@ def destroy
private
def group_link
@group_link ||= group.shared_with_group_links.find(params[:id])
end
def group_link_create_params
params.permit(:shared_group_access, :expires_at)
end
Loading