summaryrefslogtreecommitdiff
path: root/app/controllers/groups/avatars_controller.rb
blob: 1f13be449a942d4b3ab133e4039e543f5c5d42e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# frozen_string_literal: true

class Groups::AvatarsController < Groups::ApplicationController
  before_action :authorize_admin_group!

  skip_cross_project_access_check :destroy

  feature_category :subgroups

  def destroy
    @group.remove_avatar!
    @group.save

    redirect_to edit_group_path(@group), status: :found
  end
end