Browse Source

changed SPs name

develop
Robin Thoni 8 years ago
parent
commit
c63316f731

src/Auth/DataAccess/Sp/SpLuGetUserPermissionById.php → src/Auth/DataAccess/Sp/SpLuGetUserEffectivePermissionById.php View File

11
 use Luticate\Utils\DataAccess\LuStoredProcedure;
11
 use Luticate\Utils\DataAccess\LuStoredProcedure;
12
 use Luticate\Utils\Dbo\LuBoolDbo;
12
 use Luticate\Utils\Dbo\LuBoolDbo;
13
 
13
 
14
-class SpLuGetUserPermissionById extends LuStoredProcedure
14
+class SpLuGetUserEffectivePermissionById extends LuStoredProcedure
15
 {
15
 {
16
     protected static $_connection = "luticatedb";
16
     protected static $_connection = "luticatedb";
17
-    protected static $_storedProcedure = "sp_lu_get_user_permission_by_id";
17
+    protected static $_storedProcedure = "sp_lu_get_user_effective_permission_by_id";
18
     protected static $_dboClass = LuBoolDbo::class;
18
     protected static $_dboClass = LuBoolDbo::class;
19
 
19
 
20
     /**
20
     /**

src/Auth/DataAccess/Sp/SpLuGetUserPermissionByName.php → src/Auth/DataAccess/Sp/SpLuGetUserEffectivePermissionByName.php View File

11
 use Luticate\Utils\DataAccess\LuStoredProcedure;
11
 use Luticate\Utils\DataAccess\LuStoredProcedure;
12
 use Luticate\Utils\Dbo\LuBoolDbo;
12
 use Luticate\Utils\Dbo\LuBoolDbo;
13
 
13
 
14
-class SpLuGetUserPermissionByName extends LuStoredProcedure
14
+class SpLuGetUserEffectivePermissionByName extends LuStoredProcedure
15
 {
15
 {
16
     protected static $_connection = "luticatedb";
16
     protected static $_connection = "luticatedb";
17
-    protected static $_storedProcedure = "sp_lu_get_user_permission_by_name";
17
+    protected static $_storedProcedure = "sp_lu_get_user_effective_permission_by_name";
18
     protected static $_dboClass = LuBoolDbo::class;
18
     protected static $_dboClass = LuBoolDbo::class;
19
 
19
 
20
     /**
20
     /**

+ 4
- 4
tests/LuPermissionTest.php View File

1
 <?php
1
 <?php
2
-use Luticate\Auth\DataAccess\Sp\SpLuGetUserPermissionById;
3
-use Luticate\Auth\DataAccess\Sp\SpLuGetUserPermissionByName;
2
+use Luticate\Auth\DataAccess\Sp\SpLuGetUserEffectivePermissionById;
3
+use Luticate\Auth\DataAccess\Sp\SpLuGetUserEffectivePermissionByName;
4
 
4
 
5
 /**
5
 /**
6
  * Created by PhpStorm.
6
  * Created by PhpStorm.
12
 {
12
 {
13
     protected function permissionTest($expectedValue, string $permissionName, int $permissionId, int $userId)
13
     protected function permissionTest($expectedValue, string $permissionName, int $permissionId, int $userId)
14
     {
14
     {
15
-        $this->assertSame($expectedValue, SpLuGetUserPermissionByName::getPermissionValue($userId, $permissionName));
16
-        $this->assertSame($expectedValue, SpLuGetUserPermissionById::getPermissionValue($userId, $permissionId));
15
+        $this->assertSame($expectedValue, SpLuGetUserEffectivePermissionByName::getPermissionValue($userId, $permissionName));
16
+        $this->assertSame($expectedValue, SpLuGetUserEffectivePermissionById::getPermissionValue($userId, $permissionId));
17
     }
17
     }
18
 
18
 
19
     public function testPermission0True()
19
     public function testPermission0True()

Loading…
Cancel
Save