Skip to content

Commit 6b97fb0

Browse files
authored
Merge branch 'main' into tofik/cs-189-auditor-view-permission-gating
2 parents 4e80737 + f2481e5 commit 6b97fb0

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [3.26.0](https://github.com/trycompai/comp/compare/v3.25.1...v3.26.0) (2026-04-20)
2+
3+
4+
### Features
5+
6+
* **vercel:** add project filter variables and parser helper ([9718d87](https://github.com/trycompai/comp/commit/9718d8704a91afd60a17f74335258e8b5dc89ca7))
7+
18
## [3.25.1](https://github.com/trycompai/comp/compare/v3.25.0...v3.25.1) (2026-04-20)
29

310

apps/api/src/policies/policies.service.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1030,6 +1030,11 @@ export class PoliciesService {
10301030

10311031
if (!policy.pendingVersionId) {
10321032
if (policy.approverId) {
1033+
if (policy.approverId !== dto.approverId) {
1034+
throw new BadRequestException(
1035+
'Only the assigned approver can accept changes',
1036+
);
1037+
}
10331038
await db.policy.update({
10341039
where: { id: policyId },
10351040
data: { approverId: null },
@@ -1038,6 +1043,7 @@ export class PoliciesService {
10381043
'This policy has no pending changes to approve. The stale approval request has been cleared — please ask the policy owner to re-submit if a new approval is needed.',
10391044
);
10401045
}
1046+
}
10411047
throw new BadRequestException('No pending version to approve');
10421048
}
10431049

0 commit comments

Comments
 (0)