Commit 8438cfc6 authored by lphuberdeau's avatar lphuberdeau

[FIX] Some more legacy checking

parent 9d6cf3bb
......@@ -17,27 +17,8 @@ if (!isset($_REQUEST["blogId"])) {
require_once ('tiki-rss_error.php');
}
$smarty->assign('individual', 'n');
if ($userlib->object_has_one_permission($_REQUEST["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');
}
}
}
}
if ($tiki_p_blog_admin == 'y') {
$tiki_p_read_blog = 'y';
$smarty->assign('tiki_p_read_blog', 'y');
}
$tikilib->get_perm_object($_REQUEST["blogId"], 'blog');
if ($tiki_p_read_blog != 'y') {
$smarty->assign('errortype', 401);
$errmsg = tra("Permission denied you cannot view this section");
......
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