Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/FOUR-12352: The run script option will have a admin user per default. #5631

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions resources/js/processes/scripts/components/CreateScriptModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,12 @@ export default {
script: null,
projects: [],
isQuickCreate: isQuickCreateFunc(),
userRunScript: 1,
};
},
mounted() {
this.getAdminUser();
},
computed: {
modalSetUp() {
if (this.copyAssetMode) {
Expand All @@ -263,6 +267,21 @@ export default {
show() {
this.$bvModal.show("createScript");
},
getAdminUser() {
ProcessMaker.apiClient
.get(`/users/${this.userRunScript}`)
.then((response) => {
this.selectedUser = response.data;
})
},
/**
* Check if the search params contains create=true which means is coming from the Modeler as a Quick Asset Creation
* @returns {boolean}
*/
isQuickCreate() {
const searchParams = new URLSearchParams(window.location.search);
return searchParams?.get("create") === "true";
},
onClose() {
this.title = "";
this.language = "";
Expand Down
Loading