Commit ca8e256b authored by Chenu Denis's avatar Chenu Denis
Browse files

[feature] TokenUsersListAndManagePlugin only compat

parent 586daf05
......@@ -6,7 +6,7 @@
* @copyright 2020-2021 Denis Chenu <www.sondages.pro>
* @copyright 2020-2021 OECD (Organisation for Economic Co-operation and Development ) <www.oecd.org>
* @license AGPL v3
* @version 1.13.5
* @version 1.14.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
......@@ -897,14 +897,16 @@ class questionSpreadsheetSurvey extends PluginBase
if (!$this->surveyHasToken($surveyId)) {
return null;
}
if (version_compare(App()->getConfig('TokenUsersListAndManageAPI', 0), '0.14', ">=")) {
return \TokenUsersListAndManagePlugin\Utilities::getTokensList($surveyId, $token, false);
}
if(!Yii::getPathOfAlias('responseListAndManage')) {
return null;
}
if (!class_exists('\responseListAndManage\Utilities')) {
return null;
}
\reloadAnyResponse\Utilities::setForcedAllowedSettings($surveyId, 'allowTokenGroupUser');
return \responseListAndManage\Utilities::getTokensList($surveyId, $token, true);
return \responseListAndManage\Utilities::getTokensList($surveyId, $token, false);
}
/**
......
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