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

Enforce format of permissions value #7

Open
bradleybeddoes opened this issue Jan 8, 2015 · 0 comments
Open

Enforce format of permissions value #7

bradleybeddoes opened this issue Jan 8, 2015 · 0 comments
Labels
enhancement New feature or request

Comments

@bradleybeddoes
Copy link
Contributor

Permission values should look like this:

# "word" in the url-safe base64 alphabet, or single '*'
SEGMENT = /([\w-]+|\*)/
private_constant :SEGMENT
validates :value, presence: true,
                    format: { with: /\A(#{SEGMENT}:)*#{SEGMENT}\z/ }

The specs which Gumboot shares with client apps should enforce this so that apps don't need to do it themselves i.e https://github.com/ausaccessfed/spin/pull/6

@bradleybeddoes bradleybeddoes added the enhancement New feature or request label Jan 8, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant