You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For table and query permissions blocks, a boolean value (true or false) will immediately return that value, overriding any other permission checks. Fixessimonw#2402
Copy file name to clipboardexpand all lines: docs/authentication.rst
+56
Original file line number
Diff line number
Diff line change
@@ -880,6 +880,62 @@ And for ``insert-row`` against the ``reports`` table in that ``docs`` database:
880
880
}
881
881
.. [[[end]]]
882
882
883
+
For table and query-level permissions blocks, a boolean value (``true`` or ``false``) will immediately return that value, overriding any other permission checks. Anyone can insert a row into ``my-table``:
884
+
885
+
.. [[[cog
886
+
config_example(cog, """
887
+
databases:
888
+
my-db:
889
+
permissions:
890
+
insert-row:
891
+
id: root
892
+
tables:
893
+
my-table:
894
+
permissions:
895
+
insert-row: true
896
+
""")
897
+
.. ]]]
898
+
899
+
.. tab:: datasette.yaml
900
+
901
+
.. code-block:: yaml
902
+
903
+
904
+
databases:
905
+
my-db:
906
+
permissions:
907
+
insert-row:
908
+
id: root
909
+
tables:
910
+
my-table:
911
+
permissions:
912
+
insert-row: true
913
+
914
+
915
+
.. tab:: datasette.json
916
+
917
+
.. code-block:: json
918
+
919
+
{
920
+
"databases": {
921
+
"my-db": {
922
+
"permissions": {
923
+
"insert-row": {
924
+
"id": "root"
925
+
}
926
+
},
927
+
"tables": {
928
+
"my-table": {
929
+
"permissions": {
930
+
"insert-row": true
931
+
}
932
+
}
933
+
}
934
+
}
935
+
}
936
+
}
937
+
.. [[[end]]]
938
+
883
939
The :ref:`permissions debug tool <PermissionsDebugView>` can be useful for helping test permissions that you have configured in this way.
0 commit comments