Hide physical keepass paths in token and approval UX
This commit is contained in:
@@ -336,7 +336,7 @@ func (u *ui) editAPIPolicyRuleAction(index int) error {
|
||||
}
|
||||
u.apiPolicyGroupScope = true
|
||||
u.apiPolicyGroupScopeW.Value = true
|
||||
u.apiPolicyPath.SetText(strings.Join(rule.Resource.Path, " / "))
|
||||
u.apiPolicyPath.SetText(apiui.FormatResourcePath(rule.Resource.Path))
|
||||
u.apiPolicyEntryID.SetText("")
|
||||
return nil
|
||||
}
|
||||
@@ -476,7 +476,7 @@ func policyRuleParts(rule apitokens.PolicyRule) (string, string, string) {
|
||||
if rule.Resource.Kind == apitokens.ResourceEntry {
|
||||
resource = "Entry: " + rule.Resource.EntryID
|
||||
} else if len(rule.Resource.Path) > 0 {
|
||||
resource = strings.Join(rule.Resource.Path, " / ")
|
||||
resource = apiui.FormatResourcePath(rule.Resource.Path)
|
||||
}
|
||||
return effect, operation, resource
|
||||
}
|
||||
@@ -1211,5 +1211,5 @@ func formatAuditResource(resource apitokens.Resource) string {
|
||||
if len(resource.Path) == 0 {
|
||||
return "/"
|
||||
}
|
||||
return strings.Join(resource.Path, " / ")
|
||||
return apiui.FormatResourcePath(resource.Path)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user