summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAmit Rathi <amit.juschill@gmail.com>2019-03-07 15:14:22 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2019-03-07 15:14:22 +0000
commit236927a4e1a77d6ee8e0ab9a807d6e260ceccd44 (patch)
treecc77ceb73f30cf72f1b1ab2e070e9b1ab2f045d7 /app
parentcde346f37690df3cf3a1434a2b62f3ae908b3b3e (diff)
downloadgitlab-ce-236927a4e1a77d6ee8e0ab9a807d6e260ceccd44.tar.gz
Merge branch 'restrict-jupyter-login' of https://gitlab.com/amit1rrr/gitlab-ce into restrict-jupyter-login
Diffstat (limited to 'app')
-rw-r--r--app/models/clusters/applications/jupyter.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/app/models/clusters/applications/jupyter.rb b/app/models/clusters/applications/jupyter.rb
index 421a923d386..80205775b6a 100644
--- a/app/models/clusters/applications/jupyter.rb
+++ b/app/models/clusters/applications/jupyter.rb
@@ -3,7 +3,7 @@
module Clusters
module Applications
class Jupyter < ActiveRecord::Base
- VERSION = 'v0.6'.freeze
+ VERSION = '0.9-174bbd5'.freeze
self.table_name = 'clusters_applications_jupyter'
@@ -75,17 +75,22 @@ module Clusters
"gitlab" => {
"clientId" => oauth_application.uid,
"clientSecret" => oauth_application.secret,
- "callbackUrl" => callback_url
+ "callbackUrl" => callback_url,
+ "gitlabProjectIdWhitelist" => [project_id]
}
},
"singleuser" => {
"extraEnv" => {
- "GITLAB_CLUSTER_ID" => cluster.id
+ "GITLAB_CLUSTER_ID" => cluster.id.to_s
}
}
}
end
+ def project_id
+ cluster&.project&.id
+ end
+
def gitlab_url
Gitlab.config.gitlab.url
end