summaryrefslogtreecommitdiff
path: root/modules/blogapi
diff options
context:
space:
mode:
Diffstat (limited to 'modules/blogapi')
-rw-r--r--modules/blogapi/blogapi.install20
-rw-r--r--modules/blogapi/blogapi.module9
2 files changed, 28 insertions, 1 deletions
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 @@
+<?php
+// $Id$
+
+/**
+ * @defgroup updates-5.x-to-6.x Blog API updates from 5.x to 6.x
+ * @{
+ */
+
+/**
+ * Inform users about the new permission.
+ */
+function blogapi_update_6000() {
+ drupal_set_message("Blog API module does not depend on blog module's permissions anymore, but provides its own 'administer content with blog api' permission instead. Until <a href=\"". url('admin/user/permissions', array('fragment' => 'module-blogapi')) .'">this permission is assigned</a> 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
@@ -21,6 +21,13 @@ function blogapi_help($path, $arg) {
}
/**
+ * Implementation of hook_perm().
+ */
+function blogapi_perm() {
+ return array('administer content with blog api');
+}
+
+/**
* Implementation of hook_xmlrpc().
*/
function blogapi_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 {