From 33f455d2df47ef80dd5b3c736762cecd23b0ba63 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=C3=A1bor=20Hojtsy?= Date: Wed, 9 Jan 2008 09:51:35 +0000 Subject: #153998 by David_Rothstein and myself: clean up permissions in book, blog, blogapi, forum and locale modules --- modules/blogapi/blogapi.install | 20 ++++++++++++++++++++ modules/blogapi/blogapi.module | 9 ++++++++- 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 modules/blogapi/blogapi.install (limited to 'modules/blogapi') diff --git a/modules/blogapi/blogapi.install b/modules/blogapi/blogapi.install new file mode 100644 index 000000000..c7cc3e561 --- /dev/null +++ b/modules/blogapi/blogapi.install @@ -0,0 +1,20 @@ + 'module-blogapi')) .'">this permission is assigned to at least one user role, only the site administrator will be able to use Blog API features.'); + return array(); +} + +/** + * @} End of "defgroup updates-5.x-to-6.x" + * The next series of updates should start at 7000. + */ diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module index 821c35f9f..a4090d4a2 100644 --- a/modules/blogapi/blogapi.module +++ b/modules/blogapi/blogapi.module @@ -20,6 +20,13 @@ function blogapi_help($path, $arg) { } } +/** + * Implementation of hook_perm(). + */ +function blogapi_perm() { + return array('administer content with blog api'); +} + /** * Implementation of hook_xmlrpc(). */ @@ -508,7 +515,7 @@ function blogapi_validate_user($username, $password) { $user = user_authenticate(array('name' => $username, 'pass' => $password)); if ($user->uid) { - if (user_access('edit own blog', $user)) { + if (user_access('administer content with blog api', $user)) { return $user; } else { -- cgit v1.2.3