Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fc105f9295 | ||
|
|
053ab69330 | ||
|
|
fd079316f5 | ||
|
|
08664e9834 |
@@ -1531,6 +1531,12 @@ final class CoreLibsACLLoginTest extends TestCase
|
||||
$login_mock->loginGetEditAccessCuidFromUid($mock_settings['edit_access_uid']),
|
||||
'Assert check access uid to cuid valid'
|
||||
);
|
||||
// - loginGetEditAccessCuidFromId
|
||||
$this->assertEquals(
|
||||
$expected['check_access_cuid'],
|
||||
$login_mock->loginGetEditAccessCuidFromUid($mock_settings['edit_access_id']),
|
||||
'Assert check access id to cuid valid'
|
||||
);
|
||||
// Deprecated
|
||||
// - loginCheckEditAccess
|
||||
$this->assertEquals(
|
||||
|
||||
@@ -116,7 +116,7 @@ $data = [
|
||||
// log action
|
||||
// no log if login
|
||||
if (!$login->loginActionRun()) {
|
||||
$login->writeLog('Submit', $data, $cms->adbGetActionSet(), 'BINARY');
|
||||
$login->writeLog('Submit', $data, action_set:$cms->adbGetActionSet(), write_type:'BINARY');
|
||||
}
|
||||
//------------------------------ logging end
|
||||
|
||||
|
||||
@@ -1418,6 +1418,7 @@ class Login
|
||||
'additional_acl' => Json::jsonConvertToArray($res['additional_acl']),
|
||||
'data' => $ea_data
|
||||
];
|
||||
// LEGACY LOOKUP
|
||||
$unit_access_eaid[$res['edit_access_id']] = [
|
||||
'cuid' => $res['cuid'],
|
||||
];
|
||||
@@ -1552,8 +1553,10 @@ class Login
|
||||
$this->acl['unit_legacy'][$unit['id']] = $this->acl['unit'][$ea_cuid];
|
||||
// detail name/level set
|
||||
$this->acl['unit_detail'][$ea_cuid] = [
|
||||
'id' => $unit['id'],
|
||||
'name' => $unit['name'],
|
||||
'uid' => $unit['uid'],
|
||||
'cuuid' => $unit['cuuid'],
|
||||
'level' => $this->default_acl_list[$this->acl['unit'][$ea_cuid]]['name'] ?? -1,
|
||||
'default' => $unit['default'],
|
||||
'data' => $unit['data'],
|
||||
@@ -3277,6 +3280,20 @@ HTML;
|
||||
return (int)$_SESSION['LOGIN_UNIT_CUID'][$uid];
|
||||
}
|
||||
|
||||
/**
|
||||
* Legacy lookup for edit access id to cuid
|
||||
*
|
||||
* @param int $id edit access id PK
|
||||
* @return string|false edit access cuid or false if not found
|
||||
*/
|
||||
public function loginGetEditAccessCuidFromId(int $id): string|false
|
||||
{
|
||||
if (!isset($_SESSION['LOGIN_UNIT_ACL_LEVEL'][$id])) {
|
||||
return false;
|
||||
}
|
||||
return (string)$_SESSION['LOGIN_UNIT_ACL_LEVEL'][$id]['cuid'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if admin flag is set
|
||||
*
|
||||
|
||||
@@ -289,7 +289,7 @@ class Backend
|
||||
* JSON, STRING/SERIEAL, BINARY/BZIP or ZLIB
|
||||
* @param string|null $db_schema [default=null] override target schema
|
||||
* @return void
|
||||
* @deprecated Use $login->writeLog() and set action_set from ->adbGetActionSet()
|
||||
* @deprecated Use $login->writeLog($event, $data, action_set:$cms->adbGetActionSet(), write_type:$write_type)
|
||||
*/
|
||||
public function adbEditLog(
|
||||
string $event = '',
|
||||
|
||||
Reference in New Issue
Block a user