Commit 6a57665c authored by Romain Therville's avatar Romain Therville 🐭

Superadmins update

Superadmin users are now allowed to update any user (and their
password), from any project.

issue #126
parent 5ced54a6
......@@ -200,6 +200,7 @@ class tx_nG6_pi1 extends \TYPO3\CMS\Frontend\Plugin\AbstractPlugin {
$smarty->assign('server_url', $this->conf['server_url']);
$smarty->assign('single_project_display', $single_project_display);
$smarty->assign('is_ng6_admin', tx_nG6_db::is_ng6_administrator($user_id) || tx_nG6_db::is_user_ng6_superadmin($user_id) ? true : false);
$smarty->assign('is_ng6_superadmin', tx_nG6_db::is_user_ng6_superadmin($user_id) ? true : false);
// If it's a single project, add runs and analysis information
if ($single_project_display) {
......
......@@ -171,10 +171,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|| $projects[key($projects)].is_admin
|| $projects[key($projects)].is_manager
|| ($user_values.id == $user_id )
|| $is_ng6_admin }
|| $is_ng6_admin }
<td><center><input type="checkbox" id="chk_user_{$user_values.id}" value="user_{$user_values.id}" /></center>
<input type="hidden" id="chk_cruser_{$user_values.id}" value="{$user_values.cruser_id}"/></td>
<input type="hidden" id="chk_updatablepwd_{$user_values.id}" value="{$user_values.updatable_password}"/></td>
{* If the current user is superadmin, it is allowed to update anyone's password. *}
{if $is_ng6_superadmin}
<input type="hidden" id="chk_cruser_{$user_values.id}" value="{$user_id}"/></td>
<input type="hidden" id="chk_updatablepwd_{$user_values.id}" value="1"/></td>
{else}
<input type="hidden" id="chk_cruser_{$user_values.id}" value="{$user_values.cruser_id}"/></td>
<input type="hidden" id="chk_updatablepwd_{$user_values.id}" value="{$user_values.updatable_password}"/></td>
{/if}
{else}
<td></td>
{/if}
......
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