mirror of
https://github.com/nextcloud/server.git
synced 2026-04-26 00:27:49 -04:00
Merge pull request #41520 from nextcloud/bugfix/noid/finish-password-confirmation
Finish password confirmation
This commit is contained in:
commit
609932140e
5 changed files with 14 additions and 7 deletions
|
|
@ -30,6 +30,7 @@ namespace OCA\WorkflowEngine\Controller;
|
|||
use Doctrine\DBAL\Exception;
|
||||
use OCA\WorkflowEngine\Helper\ScopeContext;
|
||||
use OCA\WorkflowEngine\Manager;
|
||||
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\OCS\OCSBadRequestException;
|
||||
use OCP\AppFramework\OCS\OCSException;
|
||||
|
|
@ -103,6 +104,7 @@ abstract class AWorkflowController extends OCSController {
|
|||
* @throws OCSForbiddenException
|
||||
* @throws OCSException
|
||||
*/
|
||||
#[PasswordConfirmationRequired]
|
||||
public function create(
|
||||
string $class,
|
||||
string $name,
|
||||
|
|
@ -131,6 +133,7 @@ abstract class AWorkflowController extends OCSController {
|
|||
* @throws OCSForbiddenException
|
||||
* @throws OCSException
|
||||
*/
|
||||
#[PasswordConfirmationRequired]
|
||||
public function update(
|
||||
int $id,
|
||||
string $name,
|
||||
|
|
@ -159,6 +162,7 @@ abstract class AWorkflowController extends OCSController {
|
|||
* @throws OCSForbiddenException
|
||||
* @throws OCSException
|
||||
*/
|
||||
#[PasswordConfirmationRequired]
|
||||
public function destroy(int $id): DataResponse {
|
||||
try {
|
||||
$deleted = $this->manager->deleteOperation($id, $this->getScopeContext());
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ namespace OCA\WorkflowEngine\Controller;
|
|||
|
||||
use OCA\WorkflowEngine\Helper\ScopeContext;
|
||||
use OCA\WorkflowEngine\Manager;
|
||||
use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired;
|
||||
use OCP\AppFramework\Http\DataResponse;
|
||||
use OCP\AppFramework\OCS\OCSBadRequestException;
|
||||
use OCP\AppFramework\OCS\OCSForbiddenException;
|
||||
|
|
@ -84,6 +85,7 @@ class UserWorkflowsController extends AWorkflowController {
|
|||
* @throws OCSBadRequestException
|
||||
* @throws OCSForbiddenException
|
||||
*/
|
||||
#[PasswordConfirmationRequired]
|
||||
public function create(string $class, string $name, array $checks, string $operation, string $entity, array $events): DataResponse {
|
||||
return parent::create($class, $name, $checks, $operation, $entity, $events);
|
||||
}
|
||||
|
|
@ -93,6 +95,7 @@ class UserWorkflowsController extends AWorkflowController {
|
|||
* @throws OCSBadRequestException
|
||||
* @throws OCSForbiddenException
|
||||
*/
|
||||
#[PasswordConfirmationRequired]
|
||||
public function update(int $id, string $name, array $checks, string $operation, string $entity, array $events): DataResponse {
|
||||
return parent::update($id, $name, $checks, $operation, $entity, $events);
|
||||
}
|
||||
|
|
@ -101,6 +104,7 @@ class UserWorkflowsController extends AWorkflowController {
|
|||
* @NoAdminRequired
|
||||
* @throws OCSForbiddenException
|
||||
*/
|
||||
#[PasswordConfirmationRequired]
|
||||
public function destroy(int $id): DataResponse {
|
||||
return parent::destroy($id);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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 === '') {
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
4
dist/workflowengine-workflowengine.js
vendored
4
dist/workflowengine-workflowengine.js
vendored
File diff suppressed because one or more lines are too long
2
dist/workflowengine-workflowengine.js.map
vendored
2
dist/workflowengine-workflowengine.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue