File tree 4 files changed +8
-8
lines changed
4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ in your policy::
118
118
119
119
class ArticlesPolicy implements BeforePolicyInterface
120
120
{
121
- public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
121
+ public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
122
122
{
123
- if ($user ->getOriginalData()->is_admin) {
123
+ if ($identity ->getOriginalData()->is_admin) {
124
124
return true;
125
125
}
126
126
// fall through
Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ en su policy::
117
117
118
118
class ArticlesPolicy implements BeforePolicyInterface
119
119
{
120
- public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
120
+ public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
121
121
{
122
- if ($user ->getOriginalData()->is_admin) {
122
+ if ($identity ->getOriginalData()->is_admin) {
123
123
return true;
124
124
}
125
125
// fall through
Original file line number Diff line number Diff line change @@ -125,9 +125,9 @@ policy doit implémenter ``BeforePolicyInterface``::
125
125
126
126
class ArticlesPolicy implements BeforePolicyInterface
127
127
{
128
- public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
128
+ public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
129
129
{
130
- if ($user ->getOriginalData()->is_admin) {
130
+ if ($identity ->getOriginalData()->is_admin) {
131
131
return true;
132
132
}
133
133
// continuer
Original file line number Diff line number Diff line change @@ -111,9 +111,9 @@ ORMオブジェクトのポリシーを作成するには ``bake`` コマンド
111
111
112
112
class ArticlesPolicy implements BeforePolicyInterface
113
113
{
114
- public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null {
114
+ public function before(?IdentityInterface $identity, mixed $resource, string $action): ResultInterface|bool|null
115
115
{
116
- if ($user ->getOriginalData()->is_admin) {
116
+ if ($identity ->getOriginalData()->is_admin) {
117
117
return true;
118
118
}
119
119
// fall through
You can’t perform that action at this time.
0 commit comments