From f3be5516f130c4afc14ff4a452c45e5cd5526be9 Mon Sep 17 00:00:00 2001
From: Gerhard Killesreiter <killes_www_drop_org@227.no-reply.drupal.org>
Date: Thu, 30 Mar 2006 21:30:25 +0000
Subject: [PATCH] #56016, blogapi fails to post with no permission error unless
 uid=1, patch by samc

---
 modules/blogapi.module         | 2 +-
 modules/blogapi/blogapi.module | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/modules/blogapi.module b/modules/blogapi.module
index 534a30f1bc64..ce025f913fc8 100644
--- a/modules/blogapi.module
+++ b/modules/blogapi.module
@@ -214,7 +214,7 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte
     $edit['body'] = $content;
   }
 
-  if (!node_access('create', $node)) {
+  if (!node_access('create', $edit['type'])) {
     return blogapi_error(t('You do not have permission to create the type of post you wanted to create.'));
   }
 
diff --git a/modules/blogapi/blogapi.module b/modules/blogapi/blogapi.module
index 534a30f1bc64..ce025f913fc8 100644
--- a/modules/blogapi/blogapi.module
+++ b/modules/blogapi/blogapi.module
@@ -214,7 +214,7 @@ function blogapi_blogger_new_post($appkey, $blogid, $username, $password, $conte
     $edit['body'] = $content;
   }
 
-  if (!node_access('create', $node)) {
+  if (!node_access('create', $edit['type'])) {
     return blogapi_error(t('You do not have permission to create the type of post you wanted to create.'));
   }
 
-- 
GitLab