mirror of
https://github.com/umami-software/umami.git
synced 2026-02-11 08:07:12 +01:00
Allow team managers to transfer websites to teams
This commit is contained in:
parent
b006747a45
commit
0988808b75
3 changed files with 8 additions and 3 deletions
|
|
@ -106,7 +106,7 @@ export async function canTransferWebsiteToUser({ user }: Auth, websiteId: string
|
|||
if (website.teamId && user.id === userId) {
|
||||
const teamUser = await getTeamUser(website.teamId, userId);
|
||||
|
||||
return teamUser?.role === ROLES.teamOwner;
|
||||
return teamUser && hasPermission(teamUser.role, PERMISSIONS.websiteTransferToUser);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
@ -118,7 +118,7 @@ export async function canTransferWebsiteToTeam({ user }: Auth, websiteId: string
|
|||
if (website.userId && website.userId === user.id) {
|
||||
const teamUser = await getTeamUser(teamId, user.id);
|
||||
|
||||
return teamUser?.role === ROLES.teamOwner;
|
||||
return teamUser && hasPermission(teamUser.role, PERMISSIONS.websiteTransferToTeam);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue