Commit b99772b5 authored by Phil Hughes's avatar Phil Hughes

added license check to IdeController

parent d6d1340a
class IdeController < ApplicationController class IdeController < ApplicationController
layout 'nav_only' layout 'nav_only'
before_action :check_ide_available!
def index def index
end end
private
def check_ide_available!
render_404 unless License.feature_available?(:ide)
end
end end
...@@ -52,7 +52,7 @@ module BlobHelper ...@@ -52,7 +52,7 @@ module BlobHelper
end end
def ide_blob_link(project = @project, ref = @ref, path = @path, options = {}) 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 = options.delete(:blob)
blob ||= project.repository.blob_at(ref, path) rescue nil blob ||= project.repository.blob_at(ref, path) rescue nil
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment