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
f5e43f07
Commit
f5e43f07
authored
Sep 30, 2016
by
Katarzyna Kobierska
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent rendering the link when the author has no access
parent
71345998
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
5 deletions
+9
-5
lib/banzai/filter/user_reference_filter.rb
lib/banzai/filter/user_reference_filter.rb
+9
-5
No files found.
lib/banzai/filter/user_reference_filter.rb
View file @
f5e43f07
...
...
@@ -106,13 +106,17 @@ module Banzai
project
=
context
[
:project
]
author
=
context
[
:author
]
url
=
urls
.
namespace_project_url
(
project
.
namespace
,
project
,
only_path:
context
[
:only_path
])
if
author
&&
!
project
.
team
.
member?
(
author
)
'@all'
else
url
=
urls
.
namespace_project_url
(
project
.
namespace
,
project
,
only_path:
context
[
:only_path
])
data
=
data_attribute
(
project:
project
.
id
,
author:
author
.
try
(
:id
))
text
=
link_text
||
User
.
reference_prefix
+
'all'
data
=
data_attribute
(
project:
project
.
id
,
author:
author
.
try
(
:id
))
text
=
link_text
||
User
.
reference_prefix
+
'all'
link_tag
(
url
,
data
,
text
,
'All Project and Group Members'
)
link_tag
(
url
,
data
,
text
,
'All Project and Group Members'
)
end
end
def
link_to_namespace
(
namespace
,
link_text:
nil
)
...
...
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