From 86f73e63cc6b5f9adf68fc7c0478ef7e15b7e4e7 Mon Sep 17 00:00:00 2001 From: fenghuajia <17610303377@163.com> Date: Fri, 14 Jun 2019 18:25:55 +0800 Subject: [PATCH 1/3] add group, hide user management in aad schema(2) --- src/webportal/config/webpack.common.js | 2 - src/webportal/server/config/index.js | 4 - .../src/app/layout/layout.component.ejs | 12 +- .../src/app/layout/layout.component.js | 8 +- src/webportal/src/app/vc/vc.component.ejs | 196 ++++++------------ src/webportal/src/app/vc/vc.component.js | 52 +---- src/webportal/src/app/vc/vc.component.scss | 23 +- 7 files changed, 91 insertions(+), 206 deletions(-) diff --git a/src/webportal/config/webpack.common.js b/src/webportal/config/webpack.common.js index 14c2e68a69..593a947583 100644 --- a/src/webportal/config/webpack.common.js +++ b/src/webportal/config/webpack.common.js @@ -29,7 +29,6 @@ const helpers = require('./helpers'); const title = 'Platform for AI'; const version = require('../package.json').version; -const authnMethod = require('../server/config/index.js').authnMethod; const FABRIC_DIR = [ path.resolve(__dirname, '../src/app/job/job-view/fabric'), path.resolve(__dirname, '../src/app/home'), @@ -41,7 +40,6 @@ function generateHtml(opt) { return new HtmlWebpackPlugin(Object.assign({ title: title, version: version, - authnMethod: authnMethod, template: './src/app/layout/layout.component.ejs', minify: { collapseWhitespace: true, diff --git a/src/webportal/server/config/index.js b/src/webportal/server/config/index.js index d6d2a14499..7c563b9e6f 100644 --- a/src/webportal/server/config/index.js +++ b/src/webportal/server/config/index.js @@ -28,7 +28,6 @@ let config = { env: process.env.NODE_ENV, logLevel: process.env.LOG_LEVEL, serverPort: process.env.SERVER_PORT, - authnMethod: process.env.AUTHN_METHOD, }; // define config schema @@ -44,9 +43,6 @@ const configSchema = Joi.object().keys({ .min(8000) .max(65535) .default(9286), - authnMethod: Joi.string() - .allow(['basic', 'OIDC']) - .default('basic'), }).required(); const {error, value} = Joi.validate(config, configSchema); diff --git a/src/webportal/src/app/layout/layout.component.ejs b/src/webportal/src/app/layout/layout.component.ejs index 12a06abfc5..b8ac262d5e 100644 --- a/src/webportal/src/app/layout/layout.component.ejs +++ b/src/webportal/src/app/layout/layout.component.ejs @@ -93,13 +93,11 @@ •    K8s Dashboard - <% if (htmlWebpackPlugin.options.authnMethod !== 'OIDC') { %> - - <% } %> +