Closed kiwina closed 3 years ago
@kiwina do you mean $this->authorize
? Using Gate::authorize
works fine for me, even without validateAttributes. See https://github.com/lorisleiva/laravel-actions/discussions/124
@kiwina do you mean
$this->authorize
? UsingGate::authorize
works fine for me, even without validateAttributes. See #124
No when you use WithAttributes you have to call validateAttributes in order to trigger authorize witch drove me mad understanding why it didn't work till i saw the line in the online docs but its not really intuitive to call a method named "validateAttributes" to authorise
Hi there 👋
I see what you mean but this is documented twice on the documentation — once in the guide and once in the references — so I'm not sure there's much more that can be done there.
Feel free to submit a PR to the docs if you have a suggestion. 🙂
Hi, i suggest making it more obbvious in the docs that authorization only gets triggered when validateAttributes gets called. Or even better change the implementation as its counter intuitive to "validateAttributes" even if there is no attributes to trigger authorization