Skip to content

Commit 8bf0926

Browse files
authored
Update README.md
1 parent a3d36df commit 8bf0926

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,11 @@ Currenty these variables/objects were injected into Symfony Expression Language.
104104

105105
So you can call any method on the injected object.
106106

107+
## Add your own guard functions
108+
You can add your own guard function in two way. The first one is inline in configuration file. The second way is define your GuardFunction class by implement GuardFunctionInterface and point to it in the configuration. You can see example in the provided configuration file.
109+
110+
You can also overide the GuardEvaluator class in Application Service Provider with your own class.
111+
107112
## Todo
108113
I have a plan to provide document role for user. For example, some users may be assign as "reviewer" or "approver" for Eloquent model. So we can use something like subject.hasActorRole('reviewer') or subject.canBeReviewedBy(user). Any suggestion is welcome.
109114

0 commit comments

Comments
 (0)