Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > What values do IsAuthorizedPerForum take as permissions parameter? View modes: 
User avatar
Certified Developer v6
Certified Developer v6
hoppe - 7/26/2012 1:35:16 PM
   
What values do IsAuthorizedPerForum take as permissions parameter?
Some of my forums require group membership, while the others do not. I want to display a list of forum posts using the API, and only show those that the user has group permissions to see. If the forum doesn't require group permissions, you should be able to see those as well in addition to those based on your group membership.

I would like to just call ForumPostInfoProvider.GetForumPosts(), but I'm guessing that it's not that easy.

Do I have to call IsAuthorizedPerForum to find out about each forum in my list of posts? If so, what are the options for 'permissionName'? All I can find out is that it takes a string.

ForumInfoProvider.IsAuthorizedPerForum(1, ???, CMSContext.CurrentUser, CMSContext.CurrentSiteID);

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/1/2012 7:32:57 AM
   
RE:What values do IsAuthorizedPerForum take as permissions parameter?
Hello,

I would suggest you to use ForumPostsDataSource web part and check the Check permission property. That way you get exactly the forum posts you need and you can use the dataset according your needs in your code.

Best regards,
Boris Pocatko

User avatar
Certified Developer v6
Certified Developer v6
hoppe - 8/2/2012 7:58:56 AM
   
RE:What values do IsAuthorizedPerForum take as permissions parameter?
When I use the check permissions option, why doesn't it return posts that do not require authentication?

Thank you... the forum posts data source works great. I just have to merge the data with my posts that require authentication.

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/3/2012 3:42:46 AM
   
RE:What values do IsAuthorizedPerForum take as permissions parameter?
Hello,

I've tried to use the FormPostsDataSource web part and it showed all the posts, which don't require authentication, so it seems to be working fine on my side. Are you using some custom settings or processing which would influence the selected posts?

Best regards,
Boris Pocatko

User avatar
Certified Developer v6
Certified Developer v6
hoppe - 8/6/2012 4:36:34 PM
   
RE:What values do IsAuthorizedPerForum take as permissions parameter?
Hi Boris,

I'm not sure what I was referring to. You are correct that it is working well :)

I do have another question though. The forum posts data source works great if I'm displaying the posts for the currently logged in user. But is there a way to display the posts that a different user has permissions to? I.e., if the code is running as a scheduled task, I may want to select the posts that user 'x' has permissions to.

Thanks!

User avatar
Kentico Consulting
Kentico Consulting
kentico_borisp - 8/7/2012 3:13:57 AM
   
RE:What values do IsAuthorizedPerForum take as permissions parameter?
Hello,

This control takes the current user info internally, so the easiest workaround is to change the current user temporarily.

Best regards,
Boris Pocatko