Skip to content

Commit

Permalink
Don't allow to set impersonate_user_threshold in database
Browse files Browse the repository at this point in the history
Fixes #23679
  • Loading branch information
atrol authored and vboctor committed Dec 12, 2017
1 parent 424ff72 commit aaf7951
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion config_defaults_inc.php
Expand Up @@ -4279,7 +4279,8 @@
'class_path','library_path', 'language_path', 'absolute_path_default_upload_folder',
'ldap_simulation_file_path', 'plugin_path', 'bottom_include_page', 'top_include_page',
'default_home_page', 'logout_redirect_page', 'manual_url', 'logo_url', 'wiki_engine_url',
'cdn_enabled', 'public_config_names', 'email_login_enabled', 'email_ensure_unique'
'cdn_enabled', 'public_config_names', 'email_login_enabled', 'email_ensure_unique',
'impersonate_user_threshold'
);

/**
Expand Down
2 changes: 1 addition & 1 deletion core/authentication_api.php
Expand Up @@ -542,7 +542,7 @@ function auth_impersonate( $p_user_id ) {
* @return bool true: can impersonate, false: can't.
*/
function auth_can_impersonate( $p_user_id ) {
if( !access_has_global_level( config_get( 'impersonate_user_threshold' ) ) ) {
if( !access_has_global_level( config_get_global( 'impersonate_user_threshold' ) ) ) {
return false;
}

Expand Down

0 comments on commit aaf7951

Please sign in to comment.