style: Fixed Misspells (#223)

Fixed the various misspells which were present in the code pointed out by Go Report Card
Fixes #198

Signed-off-by: Kartik-Garg <kartik.garg@infracloud.io>
This commit is contained in:
Kartik Garg
2023-05-26 14:23:00 +05:30
committed by GitHub
parent c4a7ebe1e8
commit 59674a221a
8 changed files with 25 additions and 25 deletions

View File

@@ -559,7 +559,7 @@ func GetAuthorization(ctx context.Context, req *sentryrpc.GetUserAuthorizationRe
return nil, err
}
rp := sentry.GetKubeConfigPermissionPrivilage(permission)
rp := sentry.GetKubeConfigPermissionPrivilege(permission)
if rp > rolePrevilage {
rolePrevilage = rp
highestRole = permission
@@ -574,7 +574,7 @@ func GetAuthorization(ctx context.Context, req *sentryrpc.GetUserAuthorizationRe
}
for _, permission := range permissions {
rp := sentry.GetKubeConfigPermissionPrivilage(permission)
rp := sentry.GetKubeConfigPermissionPrivilege(permission)
if rp > rolePrevilage {
rolePrevilage = rp
highestRole = permission
@@ -787,7 +787,7 @@ func verifyClusterKubectlSettings(ctx context.Context, bs service.BootstrapServi
}
if cnAttr.SessionType == "" || cnAttr.SessionType == kubeconfig.TerminalShell {
// backward combatibility treat "" as terminal session for old kubeconfigs
// backward compatibility treat "" as terminal session for old kubeconfigs
if kc.DisableCLIKubectl {
_log.Infow("kubectl cli is not authorized for ", "cnAttr", cnAttr)
return fmt.Errorf("kubectl cli is not authorized") //deny
@@ -815,7 +815,7 @@ func verifyKubectlSettings(cnAttr kubeconfig.CNAttributes, ks *sentry.Kubeconfig
}
if cnAttr.SessionType == "" || cnAttr.SessionType == kubeconfig.TerminalShell {
// backward combatibility treat "" as terminal session for old kubeconfigs
// backward compatibility treat "" as terminal session for old kubeconfigs
if ks.DisableCLIKubectl {
_log.Infow("kubectl cli is not authorized for ", "cnAttr", cnAttr, " by ", level, "config")
return fmt.Errorf("kubectl cli is not authorized" + " by " + level + "config") //deny

View File

@@ -177,7 +177,7 @@ func GetConfigForUser(ctx context.Context, bs service.BootstrapService, aps serv
org, err := os.GetByName(ctx, opts.Organization)
if err != nil {
_log.Errorw("error getting organization data", "error", err.Error())
return nil, fmt.Errorf("failed to retrieve organziation %s", err.Error())
return nil, fmt.Errorf("failed to retrieve organization %s", err.Error())
}
oid = uuid.MustParse(org.Metadata.Id)
opts.Organization = oid.String()