Use metaconsole_access_node to allow or deny access to node for a user created and synchronized from MC
This commit is contained in:
parent
4d2f9fb4c9
commit
017e12c751
|
@ -296,7 +296,7 @@ if ($new_user && $config['admin_can_add_user']) {
|
|||
// This attributes are inherited from global configuration
|
||||
$user_info['block_size'] = $config['block_size'];
|
||||
|
||||
if (enterprise_installed() && defined('METACONSOLE')) {
|
||||
if (enterprise_installed() && is_metaconsole() === true) {
|
||||
$user_info['metaconsole_agents_manager'] = 0;
|
||||
$user_info['metaconsole_assigned_server'] = '';
|
||||
$user_info['metaconsole_access_node'] = 0;
|
||||
|
|
|
@ -814,18 +814,6 @@ foreach ($info as $user_id => $user_info) {
|
|||
'1',
|
||||
true
|
||||
);
|
||||
$data[6] .= html_print_input_image(
|
||||
'submit_delete_all',
|
||||
'images/cross_double.png',
|
||||
'',
|
||||
'',
|
||||
true,
|
||||
[
|
||||
'data-title' => __('Delete from all consoles'),
|
||||
'data-use_title_for_force_title' => '1',
|
||||
'class' => 'forced_title no-padding',
|
||||
]
|
||||
);
|
||||
$data[6] .= '</form>';
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -982,7 +982,11 @@ if (! isset($config['id_user'])) {
|
|||
exit('</html>');
|
||||
} else {
|
||||
if (((bool) $user_in_db['is_admin'] === false)
|
||||
&& ((bool) $user_in_db['not_login'] === true)
|
||||
&& ( (bool) $user_in_db['not_login'] === true
|
||||
|| (is_metaconsole() === false
|
||||
&& has_metaconsole() === true
|
||||
&& is_management_allowed() === false
|
||||
&& (bool) $user_in_db['metaconsole_access_node'] === false))
|
||||
) {
|
||||
// Logout.
|
||||
$_REQUEST = [];
|
||||
|
|
Loading…
Reference in New Issue