summaryrefslogtreecommitdiff
path: root/modules/blog/blog.module
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2004-07-13 20:40:46 +0000
committerDries Buytaert <dries@buytaert.net>2004-07-13 20:40:46 +0000
commit3613729d4f1ad8675305445e2717856b2c377faa (patch)
treecb80c11a018a9c68dbc25f924619a6a87fc73f68 /modules/blog/blog.module
parent50d78e9855b529651f3c3ef05419215fcea58e21 (diff)
downloadbrdo-3613729d4f1ad8675305445e2717856b2c377faa.tar.gz
brdo-3613729d4f1ad8675305445e2717856b2c377faa.tar.bz2
- 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)
Diffstat (limited to 'modules/blog/blog.module')
-rw-r--r--modules/blog/blog.module14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/blog/blog.module b/modules/blog/blog.module
index d49a55de6..d83b7a126 100644
--- a/modules/blog/blog.module
+++ b/modules/blog/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',