Commit 86cb1aea authored by Chenu Denis's avatar Chenu Denis
Browse files

[feature] TokenUsersListAndManagePlugin only compatibility

parent 5bfeb703
......@@ -6,7 +6,7 @@
* @copyright 2017-2021 Denis Chenu <www.sondages.pro>
* @copyright 2017 OECD (Organisation for Economic Co-operation and Development ) <www.oecd.org>
* @license AGPL v3
* @version 4.1.1
* @version 4.2.0
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE as published by
......@@ -1000,6 +1000,7 @@ class questionExtraSurvey extends PluginBase
$oCriteria->compare("token", $token);
}
if ($tokenUsage == 'group') {
\reloadAnyResponse\Utilities::setForcedAllowedSettings($surveyId, 'allowTokenGroupUser');
$oCriteria->addInCondition("token", $this->getTokensList($surveyId, $token));
}
}
......@@ -1251,6 +1252,9 @@ class questionExtraSurvey extends PluginBase
if (!$this->surveyHasToken($surveyId)) {
return $tokensList;
}
if (version_compare(App()->getConfig('TokenUsersListAndManageAPI', 0), '0.14', ">=")) {
return \TokenUsersListAndManagePlugin\Utilities::getTokensList($surveyId, $token, false);
}
if (!Yii::getPathOfAlias('responseListAndManage')) {
return $tokensList;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment