forked from baron/baron-sso
i18n, adminfront, devfront: 'make code-check' 통과를 위한 번역 싱크 엔진 개선, 룰 오브 훅 정합성 교정 및 테스트 레이스 컨디션 해결
This commit is contained in:
@@ -70,17 +70,17 @@ type SignupRequest struct {
|
||||
// User Profile Models
|
||||
|
||||
type SystemPermissions struct {
|
||||
Overview bool `json:"overview"`
|
||||
Tenants bool `json:"tenants"`
|
||||
OrgChart bool `json:"org_chart"`
|
||||
Worksmobile bool `json:"worksmobile"`
|
||||
OrySSOT bool `json:"ory_ssot"`
|
||||
DataIntegrity bool `json:"data_integrity"`
|
||||
Users bool `json:"users"`
|
||||
PermissionsDirect bool `json:"permissions_direct"`
|
||||
AuthGuard bool `json:"auth_guard"`
|
||||
ApiKeys bool `json:"api_keys"`
|
||||
AuditLogs bool `json:"audit_logs"`
|
||||
Overview bool `json:"overview"`
|
||||
Tenants bool `json:"tenants"`
|
||||
OrgChart bool `json:"org_chart"`
|
||||
Worksmobile bool `json:"worksmobile"`
|
||||
OrySSOT bool `json:"ory_ssot"`
|
||||
DataIntegrity bool `json:"data_integrity"`
|
||||
Users bool `json:"users"`
|
||||
PermissionsDirect bool `json:"permissions_direct"`
|
||||
AuthGuard bool `json:"auth_guard"`
|
||||
ApiKeys bool `json:"api_keys"`
|
||||
AuditLogs bool `json:"audit_logs"`
|
||||
|
||||
ManageOverview bool `json:"manage_overview"`
|
||||
ManageTenants bool `json:"manage_tenants"`
|
||||
|
||||
@@ -3263,14 +3263,14 @@ func (h *TenantHandler) ListRelations(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
allowedRelations := map[string]bool{
|
||||
"profile_viewers": true,
|
||||
"profile_managers": true,
|
||||
"permissions_viewers": true,
|
||||
"permissions_managers": true,
|
||||
"organization_viewers": true,
|
||||
"organization_managers": true,
|
||||
"schema_viewers": true,
|
||||
"schema_managers": true,
|
||||
"profile_viewers": true,
|
||||
"profile_managers": true,
|
||||
"permissions_viewers": true,
|
||||
"permissions_managers": true,
|
||||
"organization_viewers": true,
|
||||
"organization_managers": true,
|
||||
"schema_viewers": true,
|
||||
"schema_managers": true,
|
||||
}
|
||||
|
||||
type userRelationInfo struct {
|
||||
@@ -3308,7 +3308,7 @@ func (h *TenantHandler) ListRelations(c *fiber.Ctx) error {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if name == "Unknown" && email == "Unknown" && h.UserRepo != nil {
|
||||
user, err := h.UserRepo.FindByID(c.Context(), userID)
|
||||
if err == nil && user != nil {
|
||||
@@ -3349,14 +3349,14 @@ func (h *TenantHandler) AddRelation(c *fiber.Ctx) error {
|
||||
}
|
||||
|
||||
allowedRelations := map[string]bool{
|
||||
"profile_viewers": true,
|
||||
"profile_managers": true,
|
||||
"permissions_viewers": true,
|
||||
"permissions_managers": true,
|
||||
"organization_viewers": true,
|
||||
"organization_managers": true,
|
||||
"schema_viewers": true,
|
||||
"schema_managers": true,
|
||||
"profile_viewers": true,
|
||||
"profile_managers": true,
|
||||
"permissions_viewers": true,
|
||||
"permissions_managers": true,
|
||||
"organization_viewers": true,
|
||||
"organization_managers": true,
|
||||
"schema_viewers": true,
|
||||
"schema_managers": true,
|
||||
}
|
||||
|
||||
if !allowedRelations[req.Relation] {
|
||||
|
||||
Reference in New Issue
Block a user