Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not all Actions are publishable? #1501

Closed
bellwood opened this issue Jun 5, 2024 · 3 comments
Closed

Not all Actions are publishable? #1501

bellwood opened this issue Jun 5, 2024 · 3 comments

Comments

@bellwood
Copy link

bellwood commented Jun 5, 2024

Greetings,

Noticing that src/Actions/UpdateTeamMemberRole.php and src/Actions/ValidateTeamDeletion.php are not publishable stubs, meaning, we are not able to change the Gate check to validate those actions if folks opt to make changes to the roles in JetstreamServiceProvider.php

If the desire is not to make those Actions publishable, would it be considered to move those checks to TeamPolicy.php where all the other validation for Jetstream occurs?

Given the desire to keep Jetstream/teams as lean as possible (which is totally understandable) having some more control over what comes out-of-the-box would be very much appreciated (e.g the ability to publish more of the boilerplate)

Thank you very much.

@crynobone
Copy link
Member

It might be best to describe what's missing from Gate::forUser($user)->authorize('updateTeamMember', $team); and Gate::forUser($user)->authorize('delete', $team);

@bellwood
Copy link
Author

bellwood commented Jun 6, 2024

If you wish to use something other than updateTeamMember, delete or add additional logic, you cannot.

@driesvints
Copy link
Member

Hey @bellwood I think it's best that you attempt a PR with either solution to see what Taylor has to say. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants