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

[1.x] Added hasTeamRole check on the HasTeams trait. #251

Merged
merged 5 commits into from
Sep 22, 2020
Merged

[1.x] Added hasTeamRole check on the HasTeams trait. #251

merged 5 commits into from
Sep 22, 2020

Conversation

wotta
Copy link
Contributor

@wotta wotta commented Sep 22, 2020

I have added this check because we do have a hasTeamPermission function but I missed a function to check if the team has a specific role.
When I checked the trait I saw the following function teamRole which returns the role object.
So when I saw that I wanted to add a function that returns true or false based on the fact if the role actually exists.

I would love to read your opinion on this pull request.

Added hasTeamRole check on the HasTeams trait.
Added assertion to test if the function works.
Removed the white spacing that was added by accident.
Removed the white spacing that was added by accident.
@wotta wotta changed the title Added hasTeamRole check on the HasTeams trait. [1.x] Added hasTeamRole check on the HasTeams trait. Sep 22, 2020
@taylorotwell taylorotwell merged commit ffb70a3 into laravel:1.x Sep 22, 2020
@wotta
Copy link
Contributor Author

wotta commented Sep 22, 2020

Thanks for merging🙂

@driesvints
Copy link
Member

@wotta can you also send in a PR to the docs for this method?

@wotta
Copy link
Contributor Author

wotta commented Sep 22, 2020

Sure thing. Mind if I do that tonight?

@wotta wotta deleted the feature/add-has-team-role-permission branch September 23, 2020 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants