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
b99772b5
Commit
b99772b5
authored
Jan 19, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added license check to IdeController
parent
d6d1340a
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletion
+9
-1
app/controllers/ide_controller.rb
app/controllers/ide_controller.rb
+8
-0
app/helpers/blob_helper.rb
app/helpers/blob_helper.rb
+1
-1
No files found.
app/controllers/ide_controller.rb
View file @
b99772b5
class
IdeController
<
ApplicationController
layout
'nav_only'
before_action
:check_ide_available!
def
index
end
private
def
check_ide_available!
render_404
unless
License
.
feature_available?
(
:ide
)
end
end
app/helpers/blob_helper.rb
View file @
b99772b5
...
...
@@ -52,7 +52,7 @@ module BlobHelper
end
def
ide_blob_link
(
project
=
@project
,
ref
=
@ref
,
path
=
@path
,
options
=
{})
return
unless
show_new_ide?
(
@
project
)
return
unless
show_new_ide?
(
project
)
blob
=
options
.
delete
(
:blob
)
blob
||=
project
.
repository
.
blob_at
(
ref
,
path
)
rescue
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