mirror of
https://github.com/YMFE/yapi.git
synced 2025-02-23 13:59:28 +08:00
fix: ldap登陆用户信息可修改
This commit is contained in:
parent
4c10a4ea78
commit
35c2e0200b
@ -9,7 +9,7 @@ import { connect } from 'react-redux'
|
||||
@connect(state => {
|
||||
return {
|
||||
curUid: state.user.uid,
|
||||
userType: state.user.type,
|
||||
userType: state.user.type,
|
||||
curRole: state.user.role
|
||||
}
|
||||
}, {
|
||||
@ -67,6 +67,7 @@ class Profile extends Component {
|
||||
getUserInfo = (id) => {
|
||||
var _this = this;
|
||||
const { curUid } = this.props;
|
||||
|
||||
axios.get('/api/user/find?id=' + id).then((res) => {
|
||||
_this.setState({
|
||||
userinfo: res.data.data,
|
||||
@ -168,6 +169,7 @@ class Profile extends Component {
|
||||
let _userinfo = this.state._userinfo;
|
||||
let roles = { admin: '管理员', member: '会员' };
|
||||
let userType = "";
|
||||
console.log("userinfo", userinfo)
|
||||
if (this.props.userType === "third") {
|
||||
userType = false;
|
||||
} else if (this.props.userType === "site") {
|
||||
|
@ -144,7 +144,7 @@ class userController extends baseController {
|
||||
email: result.email,
|
||||
add_time: result.add_time,
|
||||
up_time: result.up_time,
|
||||
type: 'site',
|
||||
type: 'third',
|
||||
study: result.study
|
||||
}, 0, 'logout success...');
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ exports.ldapQuery = (username, password) => {
|
||||
});
|
||||
// 查询结束
|
||||
search.on('end', () => {
|
||||
|
||||
if (users.length > 0) {
|
||||
client.bind(users[0], password, (e) => {
|
||||
if (e) {
|
||||
|
Loading…
Reference in New Issue
Block a user