Repository: JosephSilber/bouncer (language: php)

Issue:
Fix Oracle ORA-01788



Discussion / hints:
Not all databases necessarily use the same quotes:

https://stackoverflow.com/questions/214309/do-different-databases-use-different-name-quote/214344

Fix patch:
diff --git a/src/Database/Queries/Abilities.php b/src/Database/Queries/Abilities.php
index 1b2b61c7..de9881b4 100644
--- a/src/Database/Queries/Abilities.php
+++ b/src/Database/Queries/Abilities.php
@@ -80,7 +80,9 @@ protected static function getRoleConstraint(Model $authority, $allowed)
     protected static function addRoleInheritCondition(Builder $query, Model $authority, $roles)
     {
         $query->orWhere('level', '<', function ($query) use ($authority, $roles) {
-            $query->selectRaw('max(level)')
+            $column = $query->getGrammar()->wrap('level');
+            
+            $query->selectRaw("max($column)")
                   ->from($roles)
                   ->whereExists(static::getAuthorityRoleConstraint($authority));
 


Test patch: