refs #5468 scope para VnUser
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
1597f7ab69
commit
87ffd2668e
|
@ -121,5 +121,10 @@
|
|||
"principalId": "$authenticated",
|
||||
"permission": "ALLOW"
|
||||
}
|
||||
]
|
||||
],
|
||||
"scopes": {
|
||||
"preview": {
|
||||
"fields": ["id", "name", "username", "roleFk", "nickname", "lang", "active", "created", "updated", "image", "hasGrant", "realm"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import './style.scss';
|
|||
class Controller extends ModuleCard {
|
||||
reload() {
|
||||
const filter = {
|
||||
where: {id: this.$params.id},
|
||||
include: {
|
||||
relation: 'role',
|
||||
scope: {
|
||||
|
@ -14,8 +15,11 @@ class Controller extends ModuleCard {
|
|||
};
|
||||
|
||||
return Promise.all([
|
||||
this.$http.get(`VnUsers/${this.$params.id}`, {filter})
|
||||
.then(res => this.user = res.data),
|
||||
this.$http.get(`VnUsers/preview`, {filter})
|
||||
.then(res => {
|
||||
const [user] = res.data;
|
||||
this.user = user;
|
||||
}),
|
||||
this.$http.get(`Accounts/${this.$params.id}/exists`)
|
||||
.then(res => this.hasAccount = res.data.exists)
|
||||
]);
|
||||
|
|
|
@ -8,6 +8,7 @@ class Controller extends Summary {
|
|||
if (!value) return;
|
||||
|
||||
const filter = {
|
||||
where: {id: value.id},
|
||||
include: {
|
||||
relation: 'role',
|
||||
scope: {
|
||||
|
@ -15,8 +16,11 @@ class Controller extends Summary {
|
|||
}
|
||||
}
|
||||
};
|
||||
this.$http.get(`VnUsers/${value.id}`, {filter})
|
||||
.then(res => this.$.summary = res.data);
|
||||
this.$http.get(`VnUsers/preview`, {filter})
|
||||
.then(res => {
|
||||
const [summary] = res.data;
|
||||
this.$.summary = summary;
|
||||
});
|
||||
}
|
||||
get isHr() {
|
||||
return this.aclService.hasAny(['hr']);
|
||||
|
|
Loading…
Reference in New Issue