Blog post author unable to edit his own post

Hello,

I'm trying to implement a feature where a user could edit his own blog post after he already created and published it. I ran into problems when the user is not an admin on the site and tries to edit his blog post.

Code looks something like this:

PublicApi.Users.RunAsUser(post.Author.Id.Value, () =>
{
var post = PublicApi.BlogPosts.Update(blogPostId, new BlogPostsUpdateOptions { BlogId = blogId, Title = title, Body = body }); });

Update returns empty (not null) object, and the blog post is not being updated. No exception is thrown.

I've granted "Blog - Edit Posts" permission for "Registered Users" role in "Blogs" group  where we create all the blogs for all the users.

But in my opinion the blog post owner/author, admin or no admin. should be able to edit his own blog post.

Can you suggest how to allow the editing of a blog post to a non admin user, who is an owner/author of that particular blog post ?

Thank You,

Povilas

  • In reply to Patrick Mason:

    It's possible that the permission code is checking the site permission "Feature Content" when it shouldn't be, can you test editing a blog after granting "Feature Content" permission to Registered Users?

    If this is successful then we will likely have a bug to log and hotfix.

Related