Commit b31b467e authored by lphuberdeau's avatar lphuberdeau

[FIX] More legacy permission checking

parent 8d5380de
...@@ -37,28 +37,7 @@ if (isset($_REQUEST["blogId"])) { ...@@ -37,28 +37,7 @@ if (isset($_REQUEST["blogId"])) {
$smarty->assign('individual', 'n'); $smarty->assign('individual', 'n');
if ($userlib->object_has_one_permission($blogId, 'blog')) { $tikilib->get_perm_object($blogId, 'blog');
$smarty->assign('individual', 'y');
if ($tiki_p_admin != 'y') {
// Now get all the permissions that are set for this type of permissions 'image gallery'
$perms = $userlib->get_permissions(0, -1, 'permName_desc', '', 'blogs');
foreach ($perms["data"] as $perm) {
$permName = $perm["permName"];
if ($userlib->object_has_permission($user, $_REQUEST["blogId"], 'blog', $permName)) {
$$permName = 'y';
$smarty->assign("$permName", 'y');
} else {
$$permName = 'n';
$smarty->assign("$permName", 'n');
}
}
}
}
$smarty->assign('blogId', $blogId); $smarty->assign('blogId', $blogId);
$smarty->assign('title', ''); $smarty->assign('title', '');
......
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