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
61a229e8
Commit
61a229e8
authored
Aug 22, 2017
by
Toon Claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Document `project.feature_available?` and `group.feature_available?`
Used to guard EE-licensed features.
parent
e379e1e2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
7 deletions
+6
-7
doc/development/ee_features.md
doc/development/ee_features.md
+6
-7
No files found.
doc/development/ee_features.md
View file @
61a229e8
...
@@ -11,17 +11,16 @@
...
@@ -11,17 +11,16 @@
Since the implementation of
[
GitLab CE features to work with unlicensed EE instance
][
ee-as-ce
]
Since the implementation of
[
GitLab CE features to work with unlicensed EE instance
][
ee-as-ce
]
GitLab Enterprise Edition should work like GitLab Community Edition
GitLab Enterprise Edition should work like GitLab Community Edition
when no license is active.
This means the code should work like it
when no license is active.
So EE features always should be guarded by
does in CE when
`License.feature_available?(:some_feature)`
returns
`project.feature_available?`
or
`group.feature_available?`
(or
false
.
`License.feature_available?`
if it is a system-wide feature)
.
This means, if possible, CE specs should remain untouched and extra
CE specs should remain untouched as much as possible and extra specs
s
pecs should be added for EE, stubbing the licensed feature
using the
s
hould be added for EE. Licensed features can be stubbed
using the
spec helper
`stub_licensed_features`
in
`EE::LicenseHelpers`
.
spec helper
`stub_licensed_features`
in
`EE::LicenseHelpers`
.
[
ee-as-ce
]:
https://gitlab.com/gitlab-org/gitlab-ee/issues/2500
[
ee-as-ce
]:
https://gitlab.com/gitlab-org/gitlab-ee/issues/2500
## Separation of EE code
## Separation of EE code
Merging changes from GitLab CE to EE can result in numerous conflicts.
Merging changes from GitLab CE to EE can result in numerous conflicts.
...
@@ -266,7 +265,7 @@ That way we can create a separate webpack bundle in `webpack.config.js`:
...
@@ -266,7 +265,7 @@ That way we can create a separate webpack bundle in `webpack.config.js`:
With the separate bundle in place, we can decide which bundle to load inside the
With the separate bundle in place, we can decide which bundle to load inside the
view, using the
`page_specific_javascript_bundle_tag`
helper.
view, using the
`page_specific_javascript_bundle_tag`
helper.
```
```
haml
-
content_for
:page_specific_javascripts
do
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'protected_branches'
)
=
page_specific_javascript_bundle_tag
(
'protected_branches'
)
```
```
...
...
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