A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

"Add Entry" disabled on the NewsBlog created from Club programmatically

Vote:
 

Hi all.

When a Club is created programmatically, it also creates the NewsBlog however I cannot get access to add new entries on that blog.

The following line on BlogEntry.ascx.cs return false

btnPostComment.Enabled = (CurrentUser != null ? EntitySecurityHandler.Instance.CheckAccess(CurrentEntry, CurrentUser, entryAccessRights) : false);

I am a member of the club and if I check the accessrights on the club it shows that I have full access but the buttons to add an entry is disabled. When debugging, I bypass that the Blog access verification to be able to add an entry, but then I don't have access to add comments.

I am using MyClub.aspx to display the NewsBlog (the one created under the Club). I feel that maybee I did soemthing wrong when I created the club or maybee MyClub.aspx is not the right file to handle NewsBlog?

Many thanks in advance.

#47474
Jan 30, 2011 13:42
Vote:
 

Hi,

I can make it by following:

var newsBlog = newClub.NewsBlog.Clone() as Blog;

 

Entry entry = new Entry(newsBlog, "header", "body",newsBlog.Author );
                BlogHandler.Instance.AddEntry(entry);

Entry entry = new Entry(newsBlog, "header", "body",newsBlog.Author );              

BlogHandler.Instance.AddEntry(entry);

#48723
Edited, Feb 14, 2011 8:58
This thread is locked and should be used for reference only. Please use the Legacy add-ons forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.