Skip to content

Commit e2bf46f

Browse files
committed
fix warning operations
Signed-off-by: Robert Landers <landers.robert@gmail.com>
1 parent 59172fa commit e2bf46f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cli/lib/consumer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,7 @@ func processMsg(ctx context.Context, logger *zap.Logger, msg jetstream.Msg, js j
208208
return nil
209209
case "RevokeUser":
210210
if !resource.WantTo(auth.ShareMinus, ctx) {
211-
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "revokeRole"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
211+
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "revokeUser"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
212212
msg.Ack()
213213
return nil
214214
}
@@ -225,7 +225,7 @@ func processMsg(ctx context.Context, logger *zap.Logger, msg jetstream.Msg, js j
225225
return nil
226226
case "ShareWithRole":
227227
if !resource.WantTo(auth.SharePlus, ctx) {
228-
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "revokeRole"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
228+
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "shareWithRole"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
229229
msg.Ack()
230230
return nil
231231
}
@@ -246,7 +246,7 @@ func processMsg(ctx context.Context, logger *zap.Logger, msg jetstream.Msg, js j
246246
return nil
247247
case "ShareWithUser":
248248
if !resource.WantTo(auth.SharePlus, ctx) {
249-
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "revokeRole"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
249+
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "shareWithUser"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
250250
msg.Ack()
251251
return nil
252252
}
@@ -267,7 +267,7 @@ func processMsg(ctx context.Context, logger *zap.Logger, msg jetstream.Msg, js j
267267
return nil
268268
case "ShareOwnership":
269269
if !resource.WantTo(auth.Owner, ctx) {
270-
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "revokeRole"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
270+
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "shareOwnership"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
271271
msg.Ack()
272272
return nil
273273
}
@@ -285,7 +285,7 @@ func processMsg(ctx context.Context, logger *zap.Logger, msg jetstream.Msg, js j
285285
return nil
286286
case "GiveOwnership":
287287
if !resource.WantTo(auth.Owner, ctx) {
288-
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "revokeRole"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
288+
logger.Warn("User attempted to perform an unauthorized operation", zap.String("operation", "giveOwnership"), zap.String("From", sourceId.Id), zap.String("To", id.Id), zap.String("User", string(currentUser.UserId)))
289289
msg.Ack()
290290
return nil
291291
}

0 commit comments

Comments
 (0)