PMCORE-2590 Users are not being imported with the specified role in the connection.

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-12-31 12:17:33 -04:00
parent 8e080147b7
commit deb465f52a
2 changed files with 30 additions and 5 deletions

View File

@@ -341,6 +341,9 @@ switch ($function) {
$aData['USR_STATUS'] = (isset($aUser['USR_STATUS'])) ? $aUser['USR_STATUS'] : 'ACTIVE';
$aData['USR_UID'] = $sUserUID;
$aData['USR_ROLE'] = 'PROCESSMAKER_OPERATOR';
if (isset($aFields['AUTH_SOURCE_DATA']['USR_ROLE'])) {
$aData['USR_ROLE'] = $aFields['AUTH_SOURCE_DATA']['USR_ROLE'];
}
$calendarObj = new Calendar();
$calendarObj->assignCalendarTo($sUserUID, '00000000000000000000000000000001', 'USER');

View File

@@ -216,11 +216,7 @@
{value: "ldap", text: "Open LDAP"},
{value: "ds", text: "389 DS"}
],
roles: [
{value: "PROCESSMAKER_ADMIN", text: this.$root.translation("ID_SYSTEM_ADMINISTRATOR")},
{value: "PROCESSMAKER_MANAGER", text: this.$root.translation("ID_MANAGER")},
{value: "PROCESSMAKER_OPERATOR", text: this.$root.translation("ID_OPERATOR")}
],
roles: [],
show: true
};
},
@@ -427,6 +423,27 @@
this.form.groupIdentifier = "uniquemember";
this.form.signInPolicyForLDAP = "0";
}
},
getRolesList() {
let formData = new FormData();
formData.append("action", "rolesList");
return axios.post(this.$root.baseUrl() + "users/usersAjax", formData)
.then(response => {
response;
let data = [];
for (let i in response.data) {
data.push({
value: response.data[i].ROL_UID,
text: response.data[i].ROL_CODE
});
}
this.roles = data;
})
.catch(error => {
error;
})
.finally(() => {
});
}
},
watch: {
@@ -438,6 +455,11 @@
},
deep: true
}
},
mounted() {
this.$nextTick(function () {
this.getRolesList();
});
}
}
</script>