Commit 227b4afc authored by zhijie.xue's avatar zhijie.xue

修复ldap登录后名称变小写的问题

parent 123f6208
......@@ -12,7 +12,7 @@ const authenticate = require('../service/authenticate')
const router = new Router()
const admin = ['zhijie.xue', 'luoyong.meng', 'jinfang.liu','qiuyue.gui', 'yong.zhi', 'haiyuan.wen']
const admin = ['zhijie.xue', 'luoyong.meng', 'jinfang.liu', 'qiuyue.gui', 'yong.zhi', 'haiyuan.wen']
const login = async function (ctx) {
const { body } = ctx.request
......@@ -67,7 +67,7 @@ const checkTokenNew = async (ctx) => {
const { token } = ctx.request.query
const info = await ctx.redisGet(config.QA_TOKEN, token)
if (info) {
const role = admin.includes(info.SAMACCOUNTNAME) ? ['admin'] : ['user']
const role = admin.includes(info.SAMACCOUNTNAME || info.sAMAccountName) ? ['admin'] : ['user']
if (info.title && info.title.indexOf('测试') !== -1) {
role.push('test')
......
......@@ -53,7 +53,6 @@ async function getRepoOfNs(ctx, ns) {
// 把tag信息拉平到appname上
const m = []
console.log(1, repos)
repos.forEach((item) => {
const tags = item.tags || [LASTEST]
tags.forEach((tag) => {
......
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