summaryrefslogtreecommitdiff
path: root/modules/blog
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-08-20 09:47:04 +0000
committerDries Buytaert <dries@buytaert.net>2009-08-20 09:47:04 +0000
commitc5f683b27cda9252225988003a369b04a2018a5e (patch)
treee060e265a7d684d5049ebcb6832ceaf9e6161905 /modules/blog
parent425a1f955c4a9162c89d9591def0f6122a9751d1 (diff)
downloadbrdo-c5f683b27cda9252225988003a369b04a2018a5e.tar.gz
brdo-c5f683b27cda9252225988003a369b04a2018a5e.tar.bz2
- Patch #537862 by Crell, Amitaibu, salvis: simplify and make more flexible the node access by converting hook_access() to hook_node_access().
Diffstat (limited to 'modules/blog')
-rw-r--r--modules/blog/blog.module22
1 files changed, 0 insertions, 22 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index af72d54f7..9ca7ff9af 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/blog.module
@@ -20,28 +20,6 @@ function blog_node_info() {
}
/**
- * Implement hook_permission().
- */
-function blog_permission() {
- return node_list_permissions('blog');
-}
-
-/**
- * Implement hook_access().
- */
-function blog_access($op, $node, $account) {
- switch ($op) {
- case 'create':
- // Anonymous users cannot post even if they have the permission.
- return user_access('create blog content', $account) && $account->uid;
- case 'update':
- return user_access('edit any blog content', $account) || (user_access('edit own blog content', $account) && ($node->uid == $account->uid));
- case 'delete':
- return user_access('delete any blog content', $account) || (user_access('delete own blog content', $account) && ($node->uid == $account->uid));
- }
-}
-
-/**
* Implement hook_user_view().
*/
function blog_user_view($account) {