906ac6576b
Fixups for error messages from ACL Errors Alter error messages to be more verbose and explanatory, something like: Permission denied: token with AccessorID '8a2d52a0-6b41-7077-8374-09d4fafa2d30 ' lacks permission 'service:read' on "foobar" on "foobar" in partition "foo" in namespace "bar" Signed-off-by: Mark Anderson <manderson@hashicorp.com>
19 lines
460 B
Go
19 lines
460 B
Go
//go:build !consulent
|
|
// +build !consulent
|
|
|
|
package acl
|
|
|
|
// In some sense we really want this to contain an EnterpriseMeta, but
|
|
// this turns out to be a convenient place to hang helper functions off of.
|
|
type ResourceDescriptor struct {
|
|
Name string
|
|
}
|
|
|
|
func NewResourceDescriptor(name string, _ *AuthorizerContext) ResourceDescriptor {
|
|
return ResourceDescriptor{Name: name}
|
|
}
|
|
|
|
func (od *ResourceDescriptor) ToString() string {
|
|
return "\"" + od.Name + "\""
|
|
}
|