File tree Expand file tree Collapse file tree 4 files changed +8
-8
lines changed
Expand file tree Collapse file tree 4 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -118,9 +118,9 @@ in your policy::
118118
119119 class ArticlesPolicy implements BeforePolicyInterface
120120 {
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
122122 {
123- if ($user ->getOriginalData()->is_admin) {
123+ if ($identity ->getOriginalData()->is_admin) {
124124 return true;
125125 }
126126 // fall through
Original file line number Diff line number Diff line change @@ -117,9 +117,9 @@ en su policy::
117117
118118 class ArticlesPolicy implements BeforePolicyInterface
119119 {
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
121121 {
122- if ($user ->getOriginalData()->is_admin) {
122+ if ($identity ->getOriginalData()->is_admin) {
123123 return true;
124124 }
125125 // fall through
Original file line number Diff line number Diff line change @@ -125,9 +125,9 @@ policy doit implémenter ``BeforePolicyInterface``::
125125
126126 class ArticlesPolicy implements BeforePolicyInterface
127127 {
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
129129 {
130- if ($user ->getOriginalData()->is_admin) {
130+ if ($identity ->getOriginalData()->is_admin) {
131131 return true;
132132 }
133133 // continuer
Original file line number Diff line number Diff line change @@ -111,9 +111,9 @@ ORMオブジェクトのポリシーを作成するには ``bake`` コマンド
111111
112112 class ArticlesPolicy implements BeforePolicyInterface
113113 {
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
115115 {
116- if ($user ->getOriginalData()->is_admin) {
116+ if ($identity ->getOriginalData()->is_admin) {
117117 return true;
118118 }
119119 // fall through
You can’t perform that action at this time.
0 commit comments