From 3bc1e6c7fed2243410ecf8492a33ac4d80354fcb Mon Sep 17 00:00:00 2001 From: Cerys Date: Thu, 28 Nov 2024 14:06:56 +0000 Subject: [PATCH] wrote a quick permission query example --- examples/DeegraphConnection.php | 19 +++++++++++++++++++ examples/QueryExample_Permission.php | 20 ++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 examples/DeegraphConnection.php create mode 100644 examples/QueryExample_Permission.php diff --git a/examples/DeegraphConnection.php b/examples/DeegraphConnection.php new file mode 100644 index 0000000..5b5ff1d --- /dev/null +++ b/examples/DeegraphConnection.php @@ -0,0 +1,19 @@ +On("b222c121-0ed2-5819-bbf9-4db9aab85ea3") + ->Build() + ->RunQuery(DeegraphConnection::DB()) +; + +echo "Permissions\n"; +echo "==========="; +echo "\nCan Act: " . ($permissions->CanAct ? "YES" : "NO"); +echo "\nCan Delete: " . ($permissions->CanDelete ? "YES" : "NO"); +echo "\nCan Read: " . ($permissions->CanRead ? "YES" : "NO"); +echo "\nCan Write: " . ($permissions->CanWrite ? "YES" : "NO");