mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-19 10:46:58 +08:00
Merge pull request #6184 from swordqiu/automated-cherry-pick-of-#6183-upstream-release-3.2
Automated cherry pick of #6183: fix: missing perform public/private actionlog
This commit is contained in:
@@ -27,6 +27,7 @@ import (
|
||||
"yunion.io/x/onecloud/pkg/cloudcommon/policy"
|
||||
"yunion.io/x/onecloud/pkg/httperrors"
|
||||
"yunion.io/x/onecloud/pkg/mcclient"
|
||||
"yunion.io/x/onecloud/pkg/util/logclient"
|
||||
"yunion.io/x/onecloud/pkg/util/rbacutils"
|
||||
"yunion.io/x/onecloud/pkg/util/stringutils2"
|
||||
)
|
||||
@@ -461,6 +462,7 @@ func SharablePerformPublic(model ISharableBaseModel, ctx context.Context, userCr
|
||||
|
||||
if targetScope != rbacutils.ScopeNone {
|
||||
OpsLog.LogEvent(model, ACT_PUBLIC, shareResult, userCred)
|
||||
logclient.AddActionLogWithContext(ctx, model, logclient.ACT_PUBLIC, shareResult, userCred, true)
|
||||
}
|
||||
|
||||
model.GetIStandaloneModel().ClearSchedDescCache()
|
||||
@@ -500,6 +502,7 @@ func SharablePerformPrivate(model ISharableBaseModel, ctx context.Context, userC
|
||||
}
|
||||
|
||||
OpsLog.LogEvent(model, ACT_PRIVATE, diff, userCred)
|
||||
logclient.AddActionLogWithContext(ctx, model, logclient.ACT_PRIVATE, diff, userCred, true)
|
||||
|
||||
model.GetIStandaloneModel().ClearSchedDescCache()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user