Skip to content

Commit 65f27ec

Browse files
committed
feat: add isUserEligible() hook to IPolicyDefinition interface
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 2b5c509 commit 65f27ec

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/Service/Policy/Contract/IPolicyDefinition.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,11 @@ public function defaultSystemValue(): mixed;
3434
* that must never appear in the user preferences screen.
3535
*/
3636
public function supportsUserPreference(): bool;
37+
38+
/**
39+
* Checks whether the given user is eligible to use this policy.
40+
* Returns false if the user lacks permissions or required context (e.g., not in any signing group).
41+
* Returns true by default if not overridden by specific policies.
42+
*/
43+
public function isUserEligible(PolicyContext $context): bool;
3744
}

0 commit comments

Comments
 (0)