Skip to content

Commit

Permalink
fix(form): list of forms on homepage
Browse files Browse the repository at this point in the history
if the access type is restricted, bad foreign key

Signed-off-by: Thierry Bugier <tbugier@teclib.com>
  • Loading branch information
btry committed Feb 4, 2020
1 parent b1a94f8 commit 6d8a318
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions inc/form.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2459,7 +2459,7 @@ public static function getFormRestrictionCriterias($formTable = '') {
if ($formTable == '') {
$formTable = PluginFormcreatorForm::getTable();
}
$formProfileFk = Profile::getForeignKeyField();
$formFk = self::getForeignKeyField();
$table_fp = PluginFormcreatorForm_Profile::getTable();
$entitiesRestrict = (new DBUtils())->getEntitiesRestrictCriteria($formTable, '', '', true, false);
$language = $_SESSION['glpilanguage'];
Expand All @@ -2472,7 +2472,7 @@ public static function getFormRestrictionCriterias($formTable = '') {
'OR' => [
"$formTable.access_rights" => ['<>', PluginFormcreatorForm::ACCESS_RESTRICTED],
"$formTable.id" => new QuerySubQuery([
'SELECT' => $formProfileFk,
'SELECT' => $formFk,
'FROM' => $table_fp,
'WHERE' => [
'profiles_id' => $_SESSION['glpiactiveprofile']['id']
Expand Down

0 comments on commit 6d8a318

Please sign in to comment.