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
73ce5687
Commit
73ce5687
authored
Jun 22, 2021
by
Ethan Urie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add `Feature.enabled?` check
parent
80cc465d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
ee/app/helpers/ee/issuables_helper.rb
ee/app/helpers/ee/issuables_helper.rb
+1
-1
ee/app/presenters/epic_presenter.rb
ee/app/presenters/epic_presenter.rb
+1
-1
ee/app/serializers/ee/note_user_entity.rb
ee/app/serializers/ee/note_user_entity.rb
+1
-1
No files found.
ee/app/helpers/ee/issuables_helper.rb
View file @
73ce5687
...
@@ -47,7 +47,7 @@ module EE
...
@@ -47,7 +47,7 @@ module EE
end
end
def
gitlab_team_member_badge
(
author
,
css_class:
nil
)
def
gitlab_team_member_badge
(
author
,
css_class:
nil
)
return
unless
author
.
gitlab_employee?
return
unless
author
.
gitlab_employee?
&&
::
Feature
.
enabled?
(
:gitlab_employee_badge
)
default_css_class
=
'd-inline-block align-middle'
default_css_class
=
'd-inline-block align-middle'
gitlab_team_member
=
_
(
'GitLab Team Member'
)
gitlab_team_member
=
_
(
'GitLab Team Member'
)
...
...
ee/app/presenters/epic_presenter.rb
View file @
73ce5687
...
@@ -131,7 +131,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
...
@@ -131,7 +131,7 @@ class EpicPresenter < Gitlab::View::Presenter::Delegated
url:
user_path
(
epic
.
author
),
url:
user_path
(
epic
.
author
),
username:
"@
#{
epic
.
author
.
username
}
"
,
username:
"@
#{
epic
.
author
.
username
}
"
,
src:
author_icon
,
src:
author_icon
,
is_gitlab_employee:
epic
.
author
.
gitlab_employee?
is_gitlab_employee:
epic
.
author
.
gitlab_employee?
&&
::
Feature
.
enabled?
(
:gitlab_employee_badge
)
}
}
end
end
...
...
ee/app/serializers/ee/note_user_entity.rb
View file @
73ce5687
...
@@ -5,7 +5,7 @@ module EE
...
@@ -5,7 +5,7 @@ module EE
extend
ActiveSupport
::
Concern
extend
ActiveSupport
::
Concern
prepended
do
prepended
do
expose
:gitlab_employee?
,
as: :is_gitlab_employee
,
if:
->
(
user
,
options
)
{
user
.
gitlab_employee?
}
expose
:gitlab_employee?
,
as: :is_gitlab_employee
,
if:
->
(
user
,
options
)
{
user
.
gitlab_employee?
&&
::
Feature
.
enabled?
(
:gitlab_employee_badge
)
}
end
end
end
end
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