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

It would be more intuitive if "allow": none meant "no-one can do this" #831

Closed
simonw opened this issue Jun 10, 2020 · 1 comment
Closed

Comments

@simonw
Copy link
Owner

simonw commented Jun 10, 2020

Now that I'm starting to write alternative plugins to control permissions - see #818 - I think I need an easy way to tell Datasette "no-one has permission to do X unless a plugin says otherwise".

One relatively intuitive way to do that could be like this:

{
  "databases": {
    "fixtures": {
      "allow": null
    }
  }
}

Right now I think that opens up permissions to everyone, which isn't as obvious.

@simonw
Copy link
Owner Author

simonw commented Jun 10, 2020

Actually I'm not sure about this. If "allow": null means "no-one can do this", what's the allow block syntax for "everyone can do this"?

It could be "allow": {} - but that's not intuitive because normally the allow block shows keys that need to match. {} suggests to me that no matches are possible.

So I think I'm going to stick with the current mechanism, which is that "allow": null means "anyone can do this" and "allow": {} means "no-one can do this".

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

No branches or pull requests

1 participant