Commit 9ea6faee authored by lphuberdeau's avatar lphuberdeau

[FIX] More legacy permission checking

parent dc5daff3
......@@ -34,27 +34,7 @@ $smarty->assign('quizId', $_REQUEST["quizId"]);
$smarty->assign('individual', 'n');
if ($userlib->object_has_one_permission($_REQUEST["quizId"], 'quiz')) {
$smarty->assign('individual', 'y');
if ($tiki_p_admin != 'y') {
$perms = $userlib->get_permissions(0, -1, 'permName_desc', '', 'quizzes');
foreach ($perms["data"] as $perm) {
$permName = $perm["permName"];
if ($userlib->object_has_permission($user, $_REQUEST["quizId"], 'quiz', $permName)) {
$$permName = 'y';
$smarty->assign("$permName", 'y');
} else {
$$permName = 'n';
$smarty->assign("$permName", 'n');
}
}
}
}
$tikilib->get_perm_object($_REQUEST["quizId"], 'quiz');
if ($tiki_p_admin_quizzes != 'y') {
$smarty->assign('errortype', 401);
......
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