Skip to content

Commit

Permalink
fix: missing perform public/private actionlog
Browse files Browse the repository at this point in the history
  • Loading branch information
Qiu Jian committed May 6, 2020
1 parent 68bcd4f commit c473c92
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/cloudcommon/db/sharablebase.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)
Expand Down Expand Up @@ -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()
Expand Down Expand Up @@ -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()

Expand Down

0 comments on commit c473c92

Please sign in to comment.