Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

RexT's avatar
Level 1

Spark Team Role Permissions

My spark teams have the roles: owner, admin, member. I want the admin role to be able to do everything the owner does; add/remove members, change the photo etc, but Spark uses authorised requests that check if the the current user is team owner before allowing these actions.

How do I give my admin members more permissions?

0 likes
4 replies
morpheus7's avatar

Hey,

this probably will not be possible, unless you modify the default behavior of Spark.

It would require you to then changing the ownership check for a role check.

Before:

if ($user->ownsTeam($team)) {
    // This user owns the team...
}

After:

iif ($user->roleOn($team) === 'admin') {
    // This user is an admin...
}

Also, be aware that you would have to modify this in a way, where the next update to Spark will not override it again.

You can find additional role checks here: https://spark.laravel.com/docs/9.0/teams#team-roles

Kind regards, g

RexT's avatar
Level 1

i thought that might be the case, I'll make some custom routes ta!

Please or to participate in this conversation.