diff --git a/lib/Service/ApprovalService.php b/lib/Service/ApprovalService.php index b41cd2a7..68237694 100644 --- a/lib/Service/ApprovalService.php +++ b/lib/Service/ApprovalService.php @@ -461,6 +461,9 @@ public function request(int $fileId, int $ruleId, ?string $userId, bool $createS } if ($this->userIsAuthorizedByRule($userId, $rule, 'requesters')) { + if ($this->tagObjectMapper->haveTag((string)$fileId, 'files', $rule['tagApproved'])) { + return ['error' => $this->l10n->t('Approval has already been granted with this rule for this file')]; + } // only request if it has not yet been requested for this rule if (!$this->tagObjectMapper->haveTag((string)$fileId, 'files', $rule['tagPending'])) { if ($createShares) {