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
fcffcd60
Commit
fcffcd60
authored
Jan 30, 2018
by
Matija Čupić
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add check for guest user
parent
fbbbc152
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
app/helpers/callouts_helper.rb
app/helpers/callouts_helper.rb
+1
-1
spec/helpers/callouts_helper_spec.rb
spec/helpers/callouts_helper_spec.rb
+8
-0
No files found.
app/helpers/callouts_helper.rb
View file @
fcffcd60
module
CalloutsHelper
def
show_gke_cluster_integration_callout?
(
kube_feature_name
,
project
)
!
user_dismissed?
(
kube_feature_name
)
&&
project
.
team
.
master?
(
current_user
)
current_user
&&
!
user_dismissed?
(
kube_feature_name
)
&&
project
.
team
.
master?
(
current_user
)
end
private
...
...
spec/helpers/callouts_helper_spec.rb
View file @
fcffcd60
...
...
@@ -41,5 +41,13 @@ describe CalloutsHelper do
it
{
is_expected
.
to
be
false
}
end
context
'when the user is not logged in'
do
before
do
allow
(
helper
).
to
receive
(
:current_user
).
and_return
(
nil
)
end
it
{
is_expected
.
to
be_falsey
}
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