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
a5decfef
Commit
a5decfef
authored
Jul 09, 2019
by
Nick Thomas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove the Graphql feature flag in EE too
parent
08423878
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
18 deletions
+17
-18
ee/app/models/ee/project.rb
ee/app/models/ee/project.rb
+2
-2
ee/app/views/groups/usage_quotas/index.html.haml
ee/app/views/groups/usage_quotas/index.html.haml
+4
-6
ee/spec/models/project_spec.rb
ee/spec/models/project_spec.rb
+11
-10
No files found.
ee/app/models/ee/project.rb
View file @
a5decfef
...
@@ -571,12 +571,12 @@ module EE
...
@@ -571,12 +571,12 @@ module EE
end
end
def
design_management_enabled?
def
design_management_enabled?
# LFS
and GraphQL are
required for using Design Management
# LFS
is
required for using Design Management
#
#
# Checking both feature availability on the license, as well as the feature
# Checking both feature availability on the license, as well as the feature
# flag, because we don't want to enable design_management by default on
# flag, because we don't want to enable design_management by default on
# on prem installs yet.
# on prem installs yet.
lfs_enabled?
&&
::
Gitlab
::
Graphql
.
enabled?
&&
lfs_enabled?
&&
feature_available?
(
:design_management
)
&&
feature_available?
(
:design_management
)
&&
::
Feature
.
enabled?
(
:design_management
,
self
)
::
Feature
.
enabled?
(
:design_management
,
self
)
end
end
...
...
ee/app/views/groups/usage_quotas/index.html.haml
View file @
a5decfef
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
%li
.nav-item
%li
.nav-item
%a
.nav-link
#pipelines-quota
{
data:
{
toggle:
"tab"
,
action:
'#pipelines-quota-tab'
},
href:
'#pipelines-quota-tab'
,
'aria-controls'
:
'#pipelines-quota-tab'
,
'aria-selected'
:
true
}
%a
.nav-link
#pipelines-quota
{
data:
{
toggle:
"tab"
,
action:
'#pipelines-quota-tab'
},
href:
'#pipelines-quota-tab'
,
'aria-controls'
:
'#pipelines-quota-tab'
,
'aria-selected'
:
true
}
=
s_
(
'UsageQuota|Pipelines'
)
=
s_
(
'UsageQuota|Pipelines'
)
-
if
Gitlab
::
Graphql
.
enabled?
%li
.nav-item
%li
.nav-item
%a
.nav-link
#storage-quota
{
data:
{
toggle:
"tab"
,
action:
'#storage-quota-tab'
},
href:
'#storage-quota-tab'
,
'aria-controls'
:
'#storage-quota-tab'
,
'aria-selected'
:
false
}
%a
.nav-link
#storage-quota
{
data:
{
toggle:
"tab"
,
action:
'#storage-quota-tab'
},
href:
'#storage-quota-tab'
,
'aria-controls'
:
'#storage-quota-tab'
,
'aria-selected'
:
false
}
=
s_
(
'UsageQuota|Storage'
)
=
s_
(
'UsageQuota|Storage'
)
...
@@ -24,6 +23,5 @@
...
@@ -24,6 +23,5 @@
=
render
"namespaces/pipelines_quota/list"
,
=
render
"namespaces/pipelines_quota/list"
,
locals:
{
namespace:
@group
,
projects:
@projects
}
locals:
{
namespace:
@group
,
projects:
@projects
}
.tab-pane
#storage-quota-tab
.tab-pane
#storage-quota-tab
-
if
Gitlab
::
Graphql
.
enabled?
#js-storage-counter-app
{
data:
{
namespace_path:
@group
.
full_path
}
}
#js-storage-counter-app
{
data:
{
namespace_path:
@group
.
full_path
}
}
ee/spec/models/project_spec.rb
View file @
a5decfef
...
@@ -1833,22 +1833,23 @@ describe Project do
...
@@ -1833,22 +1833,23 @@ describe Project do
describe
"#design_management_enabled?"
do
describe
"#design_management_enabled?"
do
let
(
:project
)
{
build
(
:project
)
}
let
(
:project
)
{
build
(
:project
)
}
where
(
:feature_enabled
,
:license_enabled
,
:graphql
,
:lfs
,
:expected
)
do
false
|
false
|
false
|
false
|
false
where
(
true
|
false
|
false
|
false
|
false
feature_enabled:
[
false
,
true
],
false
|
true
|
false
|
false
|
false
license_enabled:
[
false
,
true
],
false
|
false
|
true
|
false
|
false
lfs_enabled:
[
false
,
true
]
false
|
false
|
false
|
true
|
false
)
true
|
true
|
true
|
true
|
true
end
with_them
do
with_them
do
before
do
before
do
stub_licensed_features
(
design_management:
license_enabled
)
stub_licensed_features
(
design_management:
license_enabled
)
stub_feature_flags
(
design_management:
feature_enabled
,
graphql:
graphql
)
stub_feature_flags
(
design_management:
feature_enabled
)
expect
(
project
).
to
receive
(
:lfs_enabled?
).
and_return
(
lfs
)
expect
(
project
).
to
receive
(
:lfs_enabled?
).
and_return
(
lfs
_enabled
)
end
end
# Design management is only available if all dependencies are enabled
let
(
:expected
)
{
feature_enabled
&&
license_enabled
&&
lfs_enabled
}
it
"knows if design management is available"
do
it
"knows if design management is available"
do
expect
(
project
.
design_management_enabled?
).
to
be
(
expected
)
expect
(
project
.
design_management_enabled?
).
to
be
(
expected
)
end
end
...
...
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