Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to realize "--prefix=true" as in etcdctl? #53

Closed
michaelfung opened this issue Jul 3, 2018 · 3 comments · Fixed by #55
Closed

How to realize "--prefix=true" as in etcdctl? #53

michaelfung opened this issue Jul 3, 2018 · 3 comments · Fixed by #55

Comments

@michaelfung
Copy link
Contributor

Hello,

I want to grant permission to every node under '/pub/'. What I do now is:

$etcd->role_perm({
    name => 'guest',
    key => '/pub/',
    range_end => "\0",
    permType => 'READWRITE'
})->grant;  

Is it okay to stay like this , or is it better to do something like "--prefix=true" as in etcdctl?

Thanks,
Michael

@hexfusion
Copy link
Owner

@michaelfung I think this is a useful feature. The usage would be prefix => 1 or any other perly true value.

@michaelfung
Copy link
Contributor Author

Thanks! But it seems etcdctl does not achieve prefix by setting range_end to "\0".

@hexfusion
Copy link
Owner

hexfusion commented Jul 7, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants