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
62282971
Commit
62282971
authored
Apr 14, 2015
by
Robert Speicher
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename `user_can_read_group?` to `user_can_reference_group?`
parent
a803cd51
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
lib/gitlab/markdown/user_reference_filter.rb
lib/gitlab/markdown/user_reference_filter.rb
+2
-2
No files found.
lib/gitlab/markdown/user_reference_filter.rb
View file @
62282971
...
...
@@ -78,7 +78,7 @@ module Gitlab
%(<a href="#{url}" class="#{klass}">@#{user}</a>)
elsif
namespace
=
Namespace
.
find_by
(
path:
user
)
if
namespace
.
is_a?
(
Group
)
if
user_can_re
ad
_group?
(
namespace
)
if
user_can_re
ference
_group?
(
namespace
)
url
=
group_url
(
user
,
only_path:
context
[
:only_path
])
%(<a href="#{url}" class="#{klass}">@#{user}</a>)
else
...
...
@@ -117,7 +117,7 @@ module Gitlab
only_path:
context
[
:only_path
])
end
def
user_can_re
ad
_group?
(
group
)
def
user_can_re
ference
_group?
(
group
)
return
false
if
context
[
:current_user
].
blank?
Ability
.
abilities
.
allowed?
(
context
[
:current_user
],
:read_group
,
group
)
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