Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7aa551c2
Commit
7aa551c2
authored
May 27, 2021
by
Jan Provaznik
Committed by
Florie Guibert
Jun 10, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add default_enabled param
Use default from YML config file for epic_boards feature flag.
parent
0531b906
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
8 additions
and
8 deletions
+8
-8
ee/app/controllers/groups/epic_boards_controller.rb
ee/app/controllers/groups/epic_boards_controller.rb
+1
-1
ee/app/graphql/mutations/boards/epic_boards/epic_move_list.rb
...pp/graphql/mutations/boards/epic_boards/epic_move_list.rb
+1
-1
ee/app/graphql/mutations/boards/epic_boards/update.rb
ee/app/graphql/mutations/boards/epic_boards/update.rb
+1
-1
ee/app/graphql/resolvers/boards/epic_boards_resolver.rb
ee/app/graphql/resolvers/boards/epic_boards_resolver.rb
+1
-1
ee/app/services/boards/epic_boards/create_service.rb
ee/app/services/boards/epic_boards/create_service.rb
+1
-1
ee/app/services/boards/epic_lists/create_service.rb
ee/app/services/boards/epic_lists/create_service.rb
+1
-1
ee/app/services/boards/epic_lists/destroy_service.rb
ee/app/services/boards/epic_lists/destroy_service.rb
+1
-1
ee/app/views/layouts/nav/ee/_epic_link.html.haml
ee/app/views/layouts/nav/ee/_epic_link.html.haml
+1
-1
No files found.
ee/app/controllers/groups/epic_boards_controller.rb
View file @
7aa551c2
...
...
@@ -70,6 +70,6 @@ class Groups::EpicBoardsController < Groups::ApplicationController
end
def
authorize_read_board!
access_denied!
unless
Feature
.
enabled?
(
:epic_boards
,
group
)
&&
can?
(
current_user
,
:read_epic_board
,
group
)
access_denied!
unless
Feature
.
enabled?
(
:epic_boards
,
group
,
default_enabled: :yaml
)
&&
can?
(
current_user
,
:read_epic_board
,
group
)
end
end
ee/app/graphql/mutations/boards/epic_boards/epic_move_list.rb
View file @
7aa551c2
...
...
@@ -50,7 +50,7 @@ module Mutations
board
=
authorized_find!
(
id:
args
[
:board_id
])
epic
=
authorized_find!
(
id:
args
[
:epic_id
])
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
resource_parent
)
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
resource_parent
,
default_enabled: :yaml
)
raise
Gitlab
::
Graphql
::
Errors
::
ResourceNotAvailable
,
'epic_boards feature is disabled'
end
...
...
ee/app/graphql/mutations/boards/epic_boards/update.rb
View file @
7aa551c2
...
...
@@ -24,7 +24,7 @@ module Mutations
def
resolve
(
**
args
)
board
=
authorized_find!
(
id:
args
[
:id
])
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
resource_parent
)
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
resource_parent
,
default_enabled: :yaml
)
raise
Gitlab
::
Graphql
::
Errors
::
ResourceNotAvailable
,
'epic_boards feature is disabled'
end
...
...
ee/app/graphql/resolvers/boards/epic_boards_resolver.rb
View file @
7aa551c2
...
...
@@ -16,7 +16,7 @@ module Resolvers
alias_method
:group
,
:object
def
resolve
(
id:
nil
)
return
unless
Feature
.
enabled?
(
:epic_boards
,
group
)
return
unless
Feature
.
enabled?
(
:epic_boards
,
group
,
default_enabled: :yaml
)
return
unless
group
.
licensed_feature_available?
(
:epics
)
authorize!
...
...
ee/app/services/boards/epic_boards/create_service.rb
View file @
7aa551c2
...
...
@@ -8,7 +8,7 @@ module Boards
override
:can_create_board?
def
can_create_board?
Feature
.
enabled?
(
:epic_boards
,
parent
)
Feature
.
enabled?
(
:epic_boards
,
parent
,
default_enabled: :yaml
)
end
override
:parent_board_collection
...
...
ee/app/services/boards/epic_lists/create_service.rb
View file @
7aa551c2
...
...
@@ -7,7 +7,7 @@ module Boards
override
:execute
def
execute
(
board
)
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
group
)
unless
Feature
.
enabled?
(
:epic_boards
,
board
.
group
,
default_enabled: :yaml
)
return
ServiceResponse
.
error
(
message:
'Epic boards feature is not enabled.'
)
end
...
...
ee/app/services/boards/epic_lists/destroy_service.rb
View file @
7aa551c2
...
...
@@ -11,7 +11,7 @@ module Boards
return
ServiceResponse
.
error
(
message:
'Epics feature is not available.'
)
end
unless
Feature
.
enabled?
(
:epic_boards
,
list
.
board
.
group
)
unless
Feature
.
enabled?
(
:epic_boards
,
list
.
board
.
group
,
default_enabled: :yaml
)
return
ServiceResponse
.
error
(
message:
'Epic boards feature is not enabled.'
)
end
...
...
ee/app/views/layouts/nav/ee/_epic_link.html.haml
View file @
7aa551c2
...
...
@@ -20,7 +20,7 @@
=
link_to
group_epics_path
(
group
),
title:
'List'
do
%span
=
_
(
'List'
)
-
if
Feature
.
enabled?
(
:epic_boards
,
group
)
-
if
Feature
.
enabled?
(
:epic_boards
,
group
,
default_enabled: :yaml
)
=
nav_link
(
path:
[
'epic_boards#index'
,
'epic_boards#show'
],
html_options:
{
class:
"home"
})
do
=
link_to
group_epic_boards_path
(
group
),
title:
'Boards'
do
%span
=
_
(
'Boards'
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment