mirror of
https://github.com/paralus/paralus.git
synced 2026-04-22 01:26:57 +00:00
* Update dependencies from authz * authz: fix log import path * Authz related creation steps * Fix typo: Namesapce -> Namespace * Add tests for role creation interaction with authz * Switch to using names for policy and group creation in authz * Group creation not udpates casbin db * Fix reading db address from env * Tiny typo fix in readme * Simplify error handling in usermgmt server * Rework test setup * Fix all current tests * Complete authz integration * Drop unnecessary dependency on adminsrv in usermgmt
21 lines
449 B
Go
21 lines
449 B
Go
package server
|
|
|
|
import (
|
|
v3 "github.com/RafaySystems/rcloud-base/components/common/proto/types/commonpb/v3"
|
|
|
|
"google.golang.org/protobuf/types/known/timestamppb"
|
|
)
|
|
|
|
func getStatus(err error) *v3.Status {
|
|
if err != nil {
|
|
return &v3.Status{
|
|
ConditionStatus: v3.ConditionStatus_StatusFailed,
|
|
LastUpdated: timestamppb.Now(),
|
|
Reason: err.Error(),
|
|
}
|
|
}
|
|
return &v3.Status{
|
|
ConditionStatus: v3.ConditionStatus_StatusOK,
|
|
}
|
|
}
|