diff options
author | Winnie Hellmann <winnie@gitlab.com> | 2018-09-03 16:16:23 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2018-09-03 16:16:23 +0300 |
commit | 743add978aafa43862867a89b00a04e888199947 (patch) | |
tree | e2ff2db449f186d5c2dcb9da055d75851af6ab5a /app/controllers | |
parent | c0625e5de1fe491675aadf825fdb9e976f089409 (diff) |
Move badge settings to general settings
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/groups/settings/badges_controller.rb | 13 | ||||
-rw-r--r-- | app/controllers/groups_controller.rb | 2 | ||||
-rw-r--r-- | app/controllers/projects/settings/badges_controller.rb | 13 | ||||
-rw-r--r-- | app/controllers/projects_controller.rb | 2 |
4 files changed, 4 insertions, 26 deletions
diff --git a/app/controllers/groups/settings/badges_controller.rb b/app/controllers/groups/settings/badges_controller.rb deleted file mode 100644 index ccbd0a3bc02..00000000000 --- a/app/controllers/groups/settings/badges_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -module Groups - module Settings - class BadgesController < Groups::ApplicationController - include API::Helpers::RelatedResourcesHelpers - - before_action :authorize_admin_group! - - def index - @badge_api_endpoint = expose_url(api_v4_groups_badges_path(id: @group.id)) - end - end - end -end diff --git a/app/controllers/groups_controller.rb b/app/controllers/groups_controller.rb index 83169636ccf..e57b9ff23a7 100644 --- a/app/controllers/groups_controller.rb +++ b/app/controllers/groups_controller.rb @@ -1,4 +1,5 @@ class GroupsController < Groups::ApplicationController + include API::Helpers::RelatedResourcesHelpers include IssuesAction include MergeRequestsAction include ParamsBackwardCompatibility @@ -77,6 +78,7 @@ class GroupsController < Groups::ApplicationController end def edit + @badge_api_endpoint = expose_url(api_v4_groups_badges_path(id: @group.id)) end def projects diff --git a/app/controllers/projects/settings/badges_controller.rb b/app/controllers/projects/settings/badges_controller.rb deleted file mode 100644 index 7887bee49c5..00000000000 --- a/app/controllers/projects/settings/badges_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -module Projects - module Settings - class BadgesController < Projects::ApplicationController - include API::Helpers::RelatedResourcesHelpers - - before_action :authorize_admin_project! - - def index - @badge_api_endpoint = expose_url(api_v4_projects_badges_path(id: @project.id)) - end - end - end -end diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb index e9ae8c13142..0eaf9f94e37 100644 --- a/app/controllers/projects_controller.rb +++ b/app/controllers/projects_controller.rb @@ -1,4 +1,5 @@ class ProjectsController < Projects::ApplicationController + include API::Helpers::RelatedResourcesHelpers include IssuableCollections include ExtractsPath include PreviewMarkdown @@ -32,6 +33,7 @@ class ProjectsController < Projects::ApplicationController end def edit + @badge_api_endpoint = expose_url(api_v4_projects_badges_path(id: @project.id)) render 'edit' end |