syncUser() and setPassword() changes
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
e34d64361b
commit
644d98ec1c
|
@ -142,6 +142,9 @@
|
|||
},
|
||||
"PrintConfig": {
|
||||
"dataSource": "vn"
|
||||
},
|
||||
"user": {
|
||||
"dataSource": "vn"
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"name": "user",
|
||||
"base": "User",
|
||||
"options": {
|
||||
"mysql": {
|
||||
"table": "salix.User"
|
||||
}
|
||||
},
|
||||
"properties": {
|
||||
"id": {
|
||||
"id": true,
|
||||
"type": "number",
|
||||
"forceId": false
|
||||
},
|
||||
"username":{
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
create or replace definer = root@localhost view User as
|
||||
select `account`.`user`.`id` AS `id`,
|
||||
`account`.`user`.`realm` AS `realm`,
|
||||
`account`.`user`.`name` AS `name`,
|
||||
`account`.`user`.`nickname` AS `nickname`,
|
||||
`account`.`user`.`bcryptPassword` AS `password`,
|
||||
`account`.`user`.`role` AS `role`,
|
||||
`account`.`user`.`active` AS `active`,
|
||||
`account`.`user`.`email` AS `email`,
|
||||
`account`.`user`.`emailVerified` AS `emailVerified`,
|
||||
`account`.`user`.`verificationToken` AS `verificationToken`,
|
||||
`account`.`user`.`lang` AS `lang`,
|
||||
`account`.`user`.`lastPassChange` AS `lastPassChange`,
|
||||
`account`.`user`.`created` AS `created`,
|
||||
`account`.`user`.`updated` AS `updated`,
|
||||
`account`.`user`.`image` AS `image`,
|
||||
`account`.`user`.`recoverPass` AS `recoverPass`,
|
||||
`account`.`user`.`sync` AS `sync`,
|
||||
`account`.`user`.`hasGrant` AS `hasGrant`
|
||||
from `account`.`user`;
|
||||
|
|
@ -177,7 +177,7 @@ module.exports = Self => {
|
|||
|
||||
async syncUser(userName, info, password) {
|
||||
if (info.user && password)
|
||||
await app.models.VnUser.setPassword(info.user.id, password);
|
||||
await app.models.user.setPassword(info.user.id, password);
|
||||
},
|
||||
|
||||
async getUsers(usersToSync) {
|
||||
|
|
Loading…
Reference in New Issue