feat: support shared application across organizations (#3108)

* feat: support share application

* revert: revert i18n

* fix: improve code format

* fix: improve code format and move GetSharedOrgFromApp to string.go
This commit is contained in:
DacongDA
2024-08-09 15:43:25 +08:00
committed by GitHub
parent e7230700e0
commit 4c0fff66ff
9 changed files with 75 additions and 16 deletions

View File

@ -1138,7 +1138,7 @@ func (user *User) IsApplicationAdmin(application *Application) bool {
return false
}
return (user.Owner == application.Organization && user.IsAdmin) || user.IsGlobalAdmin()
return (user.Owner == application.Organization && user.IsAdmin) || user.IsGlobalAdmin() || (user.IsAdmin && application.IsShared)
}
func (user *User) IsGlobalAdmin() bool {