Drop unnecessary error checks

This commit is contained in:
Abin Simon
2022-05-11 17:17:36 +05:30
parent cfccc1f55c
commit 7e025813d9

View File

@@ -345,20 +345,8 @@ func GetAuthorization(ctx context.Context, req *sentryrpc.GetUserAuthorizationRe
// get attributes from user CN
cnAttr := kubeconfig.GetCNAttributes(req.UserCN)
accountID := cnAttr.AccountID
if err != nil {
_log.Errorw("error getting accountID from user CN", "userCN", req.UserCN)
return nil, err
}
orgID := cnAttr.OrganizationID
if err != nil {
_log.Errorw("error getting orgID from user CN", "userCN", req.UserCN)
return nil, err
}
partnerID := cnAttr.PartnerID
if err != nil {
_log.Errorw("error getting partnerID from user CN", "userCN", req.UserCN)
return nil, err
}
if cnAttr.SystemUser {
return getSystemUserAuthz(cnAttr)