- Patch #259496 by ksenzee and Desbeers: fixed a permission bug discovered by the tests. Yay.
parent
fd06c1db21
commit
9a1a6c6467
|
@ -171,7 +171,7 @@ function blog_page_user_access($account) {
|
||||||
// The visitor must be able to access the site's content.
|
// The visitor must be able to access the site's content.
|
||||||
// For a blog to 'exist' the user must either be able to
|
// For a blog to 'exist' the user must either be able to
|
||||||
// create new blog entries, or it must have existing posts.
|
// create new blog entries, or it must have existing posts.
|
||||||
return $account->uid && user_access('access content') && (user_access('create blog entries', $account) || _blog_post_exists($account));
|
return $account->uid && user_access('access content') && (user_access('create blog content', $account) || _blog_post_exists($account));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -16,7 +16,7 @@ function blog_page_user($account) {
|
||||||
|
|
||||||
$items = array();
|
$items = array();
|
||||||
|
|
||||||
if (($account->uid == $user->uid) && user_access('create blog entries')) {
|
if (($account->uid == $user->uid) && user_access('create blog content')) {
|
||||||
$items[] = l(t('Post new blog entry.'), "node/add/blog");
|
$items[] = l(t('Post new blog entry.'), "node/add/blog");
|
||||||
}
|
}
|
||||||
else if ($account->uid == $user->uid) {
|
else if ($account->uid == $user->uid) {
|
||||||
|
|
Loading…
Reference in New Issue