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

"permissions" blocks in metadata.json/yaml #1938

Closed
wants to merge 3 commits into from

Conversation

simonw
Copy link
Owner

@simonw simonw commented Dec 8, 2022

Refs #1636

  • Documentation
  • Implementation
  • Validate metadata to check there are no nonsensical permissions (like debug-menu set at the table level)
  • Tests

📚 Documentation preview 📚: https://datasette--1938.org.readthedocs.build/en/1938/

@simonw
Copy link
Owner Author

simonw commented Dec 8, 2022

@codecov
Copy link

codecov bot commented Dec 8, 2022

Codecov Report

Base: 92.00% // Head: 92.01% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (6e35a6b) compared to base (e539c1c).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1938      +/-   ##
==========================================
+ Coverage   92.00%   92.01%   +0.01%     
==========================================
  Files          38       38              
  Lines        5378     5386       +8     
==========================================
+ Hits         4948     4956       +8     
  Misses        430      430              
Impacted Files Coverage Δ
datasette/default_permissions.py 95.10% <100.00%> (+0.29%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

simonw added a commit that referenced this pull request Dec 9, 2022
simonw added a commit that referenced this pull request Dec 13, 2022
* Docs for permissions: in metadata, refs #1636
* Refactor default_permissions.py to help with implementation of #1636
* register_permissions() plugin hook, closes #1939 - also refs #1938
* Tests for register_permissions() hook, refs #1939
* Documentation for datasette.permissions, refs #1939
* permission_allowed() falls back on Permission.default, refs #1939
* Raise StartupError on duplicate permissions
* Allow dupe permisisons if exact matches
@simonw
Copy link
Owner Author

simonw commented Dec 13, 2022

@simonw simonw closed this Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant