Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Next Next commit
fix(workflows): Finish password confirmation
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Nov 16, 2023
commit f6d846cb52310a1e1ccca0e2ea71e425667ab97d
3 changes: 3 additions & 0 deletions apps/workflowengine/lib/Controller/AWorkflowController.php
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ public function show(string $id): DataResponse {
}

/**
* @PasswordConfirmationRequired
* @throws OCSBadRequestException
* @throws OCSForbiddenException
* @throws OCSException
Expand Down Expand Up @@ -127,6 +128,7 @@ public function create(
}

/**
* @PasswordConfirmationRequired
* @throws OCSBadRequestException
* @throws OCSForbiddenException
* @throws OCSException
Expand Down Expand Up @@ -155,6 +157,7 @@ public function update(
}

/**
* @PasswordConfirmationRequired
* @throws OCSBadRequestException
* @throws OCSForbiddenException
* @throws OCSException
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ public function show(string $id): DataResponse {

/**
* @NoAdminRequired
* @PasswordConfirmationRequired
* @throws OCSBadRequestException
* @throws OCSForbiddenException
*/
Expand All @@ -90,6 +91,7 @@ public function create(string $class, string $name, array $checks, string $opera

/**
* @NoAdminRequired
* @PasswordConfirmationRequired
* @throws OCSBadRequestException
* @throws OCSForbiddenException
*/
Expand All @@ -99,6 +101,7 @@ public function update(int $id, string $name, array $checks, string $operation,

/**
* @NoAdminRequired
* @PasswordConfirmationRequired
* @throws OCSForbiddenException
*/
public function destroy(int $id): DataResponse {
Expand Down
7 changes: 3 additions & 4 deletions apps/workflowengine/src/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ const store = new Store({
context.commit('addRule', rule)
})
},
createNewRule(context, rule) {
async createNewRule(context, rule) {
await confirmPassword()
let entity = null
let events = []
if (rule.isComplex === false && rule.fixedEntity === '') {
Expand Down Expand Up @@ -120,9 +121,7 @@ const store = new Store({
context.commit('removeRule', rule)
},
async pushUpdateRule(context, rule) {
if (context.state.scope === 0) {
await confirmPassword()
}
await confirmPassword()
let result
if (rule.id < 0) {
result = await axios.post(getApiUrl(''), rule)
Expand Down