This occurred due to the optimizations in pull request #1101. The
$sql_user must, in it's entirety, be enclosed in parenthesis.
Otherwise, expand host functionality breaks.
I've also added the site_id in this commit to reduce the effort in
attempting to maintain both the feature branch and the develop branch.
It's not used, but returned.
Cleanup includes some misqueues in the pull request as well as some
other miscelaneous changes associated with how we have landed on
formatting.
Chagne include:
* No soft tabs on initial tabbing
* ON clause of JOIN should be capitalized and on separate line
* AND/OR should be capitalized in SQL Queries
* Formatting of db_..() functions calls
* Use of sizeof() instead of isset() for array checks
* i18n of Secpass check return values
* Remove trailing whitespace from lines
- ToDo: Remove more having in place of WHERE clauses
* Update cacti.sql
Added 2 entry for cn_full_name and cn_email
* Update cacti.sql
Change the size to 50
* Create 1_2_0.php
Added the change on table user_domains_ldap, to provide info for full_name and email
* Update global_settings.php
Added the 2 new entry as new section for LDAP settings:
ldap_cn_fullname
ldap_cn_email
* Update auth.php
Added the email address on user_copy function
* Update ldap.php
Added the ldap_search_cn to search 2 specific CN on LDAP server
* Update auth_login.php
Added the Get user CN part for new LDAP users
* Update ldap.php
little error on ldap_search inside Getcn function
* Update user_domains.php
Add option to manage Full name and email taken from LDAP server
* Update auth_login.php
Change for multidomain authentication
* Update global_settings.php
change the name ldap_cn_xxx to just cn_xxx
* Update ldap.php
Correction to the error number and message when the CN is not find
* Update settings.php
Added the visibility of CN fields only for LDAP authentication mode
* Update ldap.php
correct on line 729 missing $ before this->cn
* Update cacti.sql
column definitions consistent with the definitions under install/upgrades/1_2_0.php
* Update auth_login.php
correct tab, as space, and add {} in if else statment
* Update ldap.php
correction on cacti_log with $output['error_text'], correction on all error_num 99 as '99'
and made some correction int tab/space
* Update auth_login.php
add missing {} on else function
auth.php:
- get_auth_realms() small refactor
- is_graph_allowed() unused variable $graph and unnecessary if-statement
- auth_check_perms() one count of $objects instead of multiple
- is_device_allowed()unused variable $host and unnecessary if-statement
- is_graph_template_allowed()unused variable $template and unnecessary if-statement
- is_view_allowed() unnecessary if-statement
html_tree.php:
- 2x query refactor for use of index reference instead use of function
- deleted unused select statement
html_utility.php:
- isset_request_var() unnecessary if-statement
Restricted user does not see graphs in tree view. Also caught some
issues in the Tree Permissions section of both user and User Group's,
and additional Tree permissions when reproducing the users environment.