From 3613729d4f1ad8675305445e2717856b2c377faa Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Tue, 13 Jul 2004 20:40:46 +0000 Subject: - Patch #8398 by TDobes: changed permissions for the blog, story, and page modules (and all occurrances elsewhere) to match their 4.4.x equivalents. In the discussion when these permissions were introduced, it was decided that "edit own ..." was clearer, but "maintain personal ..." slipped into CVS HEAD anyway, while "edit own ..." landed in the 4.4.x branch. Changes are as follows: "maintain personal blog" -> "edit own blog" (aggregator.module, blog.module, blogapi.module) "maintain personal pages" -> "edit own pages" (page.module) "maintain personal stories" -> "edit own stories (story.module) --- modules/blog.module | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'modules/blog.module') diff --git a/modules/blog.module b/modules/blog.module index d49a55de6..d83b7a126 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -21,7 +21,7 @@ function blog_node_name($node) { * Implementation of hook_perm(). */ function blog_perm() { - return array('maintain personal blog'); + return array('edit own blog'); } /** @@ -35,15 +35,15 @@ function blog_access($op, $node) { } if ($op == 'create') { - return user_access('maintain personal blog') && $user->uid; + return user_access('edit own blog') && $user->uid; } if ($op == 'update') { - return user_access('maintain personal blog') && ($user->uid == $node->uid); + return user_access('edit own blog') && ($user->uid == $node->uid); } if ($op == 'delete') { - return user_access('maintain personal blog') && ($user->uid == $node->uid); + return user_access('edit own blog') && ($user->uid == $node->uid); } } @@ -52,7 +52,7 @@ function blog_access($op, $node) { * Implementation of hook_user(). */ function blog_user($type, &$edit, &$user) { - if ($type == 'view' && user_access('maintain personal blog', $user)) { + if ($type == 'view' && user_access('edit own blog', $user)) { return array(t('History') => form_item(t('Blog'), l(t('view recent blog entries'), "blog/$user->uid", array('title' => t("Read %username's latest blog entries.", array('%username' => $user->name)))))); } } @@ -268,13 +268,13 @@ function blog_menu() { $items = array(); $items[] = array('path' => 'node/add/blog', 'title' => t('blog entry'), - 'access' => user_access('maintain personal blog')); + 'access' => user_access('edit own blog')); $items[] = array('path' => 'blog', 'title' => t('blogs'), 'callback' => 'blog_page', 'access' => user_access('access content'), 'type' => MENU_SUGGESTED_ITEM); $items[] = array('path' => 'blog/'. $user->uid, 'title' => t('my blog'), - 'access' => user_access('maintain personal blog'), + 'access' => user_access('edit own blog'), 'type' => MENU_DYNAMIC_ITEM); $items[] = array('path' => 'blog/feed', 'title' => t('RSS feed'), 'callback' => 'blog_feed', -- cgit v1.2.3