Copilot commented on code in PR #785:
URL: https://github.com/apache/ranger/pull/785#discussion_r2657040672


##########
security-admin/scripts/setup.sh:
##########
@@ -114,18 +114,18 @@ policymgr_http_enabled=$(get_prop 
'policymgr_http_enabled' $PROPFILE)
 policymgr_https_keystore_file=$(get_prop 'policymgr_https_keystore_file' 
$PROPFILE)
 policymgr_https_keystore_keyalias=$(get_prop 
'policymgr_https_keystore_keyalias' $PROPFILE)
 policymgr_https_keystore_password=$(get_prop 
'policymgr_https_keystore_password' $PROPFILE)
-policymgr_supportedcomponents=$(get_prop 'policymgr_supportedcomponents' 
$PROPFILE)
+policymgr_supportedcomponents=$(get_prop_or_default 
'policymgr_supportedcomponents' $PROPFILE '')
 unix_user=$(get_prop 'unix_user' $PROPFILE)
 unix_user_pwd=$(get_prop 'unix_user_pwd' $PROPFILE)
 unix_group=$(get_prop 'unix_group' $PROPFILE)
 authentication_method=$(get_prop 'authentication_method' $PROPFILE)
-remoteLoginEnabled=$(get_prop 'remoteLoginEnabled' $PROPFILE)
-authServiceHostName=$(get_prop 'authServiceHostName' $PROPFILE)
-authServicePort=$(get_prop 'authServicePort' $PROPFILE)
-ranger_unixauth_keystore=$(get_prop 'ranger_unixauth_keystore' $PROPFILE)
-ranger_unixauth_keystore_password=$(get_prop 
'ranger_unixauth_keystore_password' $PROPFILE)
-ranger_unixauth_truststore=$(get_prop 'ranger_unixauth_truststore' $PROPFILE)
-ranger_unixauth_truststore_password=$(get_prop 
'ranger_unixauth_truststore_password' $PROPFILE)
+remoteLoginEnabled=$(get_prop_or_default 'remoteLoginEnabled' $PROPFILE 
'false')

Review Comment:
   The variable name `remoteLoginEnabled` uses camelCase, which is inconsistent 
with the snake_case naming convention used throughout this file (e.g., 
`unix_user`, `cookie_domain`, `audit_solr_urls`). Consider renaming to 
`remote_login_enabled` for consistency.
   ```suggestion
   remote_login_enabled=$(get_prop_or_default 'remoteLoginEnabled' $PROPFILE 
'false')
   ```



##########
security-admin/scripts/setup.sh:
##########
@@ -114,18 +114,18 @@ policymgr_http_enabled=$(get_prop 
'policymgr_http_enabled' $PROPFILE)
 policymgr_https_keystore_file=$(get_prop 'policymgr_https_keystore_file' 
$PROPFILE)
 policymgr_https_keystore_keyalias=$(get_prop 
'policymgr_https_keystore_keyalias' $PROPFILE)
 policymgr_https_keystore_password=$(get_prop 
'policymgr_https_keystore_password' $PROPFILE)
-policymgr_supportedcomponents=$(get_prop 'policymgr_supportedcomponents' 
$PROPFILE)
+policymgr_supportedcomponents=$(get_prop_or_default 
'policymgr_supportedcomponents' $PROPFILE '')
 unix_user=$(get_prop 'unix_user' $PROPFILE)
 unix_user_pwd=$(get_prop 'unix_user_pwd' $PROPFILE)
 unix_group=$(get_prop 'unix_group' $PROPFILE)
 authentication_method=$(get_prop 'authentication_method' $PROPFILE)
-remoteLoginEnabled=$(get_prop 'remoteLoginEnabled' $PROPFILE)
-authServiceHostName=$(get_prop 'authServiceHostName' $PROPFILE)
-authServicePort=$(get_prop 'authServicePort' $PROPFILE)
-ranger_unixauth_keystore=$(get_prop 'ranger_unixauth_keystore' $PROPFILE)
-ranger_unixauth_keystore_password=$(get_prop 
'ranger_unixauth_keystore_password' $PROPFILE)
-ranger_unixauth_truststore=$(get_prop 'ranger_unixauth_truststore' $PROPFILE)
-ranger_unixauth_truststore_password=$(get_prop 
'ranger_unixauth_truststore_password' $PROPFILE)
+remoteLoginEnabled=$(get_prop_or_default 'remoteLoginEnabled' $PROPFILE 
'false')
+authServiceHostName=$(get_prop_or_default 'authServiceHostName' $PROPFILE '')
+authServicePort=$(get_prop_or_default 'authServicePort' $PROPFILE '')

Review Comment:
   The variable names `authServiceHostName` and `authServicePort` use 
camelCase, which is inconsistent with the snake_case naming convention used 
throughout this file. Consider renaming to `auth_service_host_name` and 
`auth_service_port` for consistency.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to