mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-01 15:07:17 +08:00
fix: guest create eip quota check use owner quota
This commit is contained in:
@@ -2531,7 +2531,8 @@ func (self *SGuest) PerformCreateEip(ctx context.Context, userCred mcclient.Toke
|
||||
quotaPlatform := self.GetQuotaPlatformID()
|
||||
|
||||
eipPendingUsage := &SQuota{Eip: 1}
|
||||
err = QuotaManager.CheckSetPendingQuota(ctx, userCred, rbacutils.ScopeProject, userCred, quotaPlatform, eipPendingUsage)
|
||||
ownerCred := self.GetOwnerId()
|
||||
err = QuotaManager.CheckSetPendingQuota(ctx, userCred, rbacutils.ScopeProject, ownerCred, quotaPlatform, eipPendingUsage)
|
||||
if err != nil {
|
||||
return nil, httperrors.NewOutOfQuotaError("Out of eip quota: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user