Sitefinity ASP.NET CMS - Content Management System

Support Forum Thread

Home >  Support >  Forums home > Sitefinity 3.x > Modules > "Single Forum" control & private forums

Reply
DeadlyAccurate, 2/21/2008 12:25:45 PM
How does the "single forum" control work? I read the kb article and the documentation in the PDFs, and I still can't figure out what it actually does. I need to create forums that only certain roles have access to. Is that possible, and is the "single forum" control the way to go about it?

Reply
, 2/22/2008 9:41:06 AM
Hi DeadlyAccurate,

Actually, to enable forums on your web site, you only need to insert the Forums control on your page. If you do this, you'll have fully functional forums and clicking the forum title will open all its threads in the same page. You can use the Single Forum control if you want the threads to open in another page. To get this to work you need to:
1. Insert the Single Forum control on a web page and set its AllForumsPage property to point to the page containing the Forums control, otherwise the Back to all forums link won't work.

2. Set the SingleForumPage property of Forums control to point to the page containing Single Forums control. Thus, when you click on a forum title in the list of forums, all threads in this forum will open in a new page.

We are not quite sure what you mean by this "create forums that only certain roles have access to".
If you are talking about the administrative backend, this is easily achievable with the current implementation. Create a user role called for example "No access to forums" and at the Forums tab, click Permissions in the left pane. In the dropdown, select this role and set the View permission to Deny. The users assigned to this role will not be able to access the whole Forums module. 
With versions 3.1 and 3.2, you won't be able to set this permission per forum, i.e. RoleA has access to ForumA only, RoleB to ForumB, etc. We plan to provide more granular permissions for all modules, not only forums, but we cannot promise when exactly they will be available.

You can also achieve something similar using a custom provider for modules (PrivateForum). Then you'll be able to set permissions like this: RoleA has permissions for PrivateForum only; RoleB has permissions for the default forums provider. In this case, both roles will be able to view the Forums tab in the admin section, but will be allowed to manage certain forums only.
For details about creating and adding your own provider, please look at the Developer Manual: Sitefinity Modules > Forums > Forums Provider Customization.

If you are talking about the public part, you can use the "Deny anonymous authors" property. When you set "Deny anonymous authors", only users that are authenticated and authorized can post in forums. An authorized user is a user who belongs to a role that has Create permissions for the Forums module. Please examine the TIU site, this functionality with forums and forum users is provided there.

Please let us know if there is some misunderstanding or if you need any further assistance.

Kind regards,
Rebecca
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
Szymon, 7/16/2008 9:49:35 AM
Hi,

I have a very similar requirement but I need to restrict access to certain forums depending on the user role. So some forums need to be visible only to users with RoleA and other with RoleB and so on.

Would be best to filter the forums automatically on the same page but if thats not possible than I can create separate page for each role and restrict access to the page. But my question is how to effectively restrict access to the forums so only the users in particular role can view and post to it.

Maybe this is something you consider already as part of the "Permission by Role" feature described on the other thread, but unfortunatelly I can't wait for the next release. Please let me know if this can be implemented by using the the Sitefity's APIs.

Regards,
-Szymon


Reply
, 7/18/2008 4:33:57 AM
Hi Szymon,

This functionality is exactly covered by the feature we plan to release. However, currently we have concentrated our efforts on stabilization and security and do not plan to release new features until the next major version. We cannot give you a specific date for that yet.

The current API does not allow you to do these granular permissions. The only close solution for now would be to create different providers for Forums and set different permissions for those providers. However, then you would have to do extra effort to display Forums from both providers on the public site.

Kind regards,
Slavo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center

Reply
Szymon, 7/18/2008 5:56:58 AM
Hi Slavo,

I've tried the approach you outlined. I've added second provider to the forums section. The trick was to set a distinct applicationName for the other provider. The administration module behaves as expected. I can select the providers from a drop down on the left and it shows me the coresponding forums. There is a small bug where I can select categories from the other provider.

I created two separate pages for each forums - where one is open and other one is secured. However I have problem with the ForumList control. It seems it doesn't honor the ProviderName setting at all and always displayes only the default provider. I verified this by changing the defaultProvider to the other one and then it was displayed on both pages.

Please let me know if I'm doing something incorrect or is it a bug in the control.

Regards,
-Szymon

Reply
Szymon, 7/18/2008 7:45:56 AM
Turns out that the Forums controls works fine and I'm able to setup page for the secondary forum. I've submited both problems as support tickets.

-Szymon

Reply
, 7/21/2008 11:09:16 AM
Hi Szymon,

We've reproduced the problems and will answer to your questions in the support tickets you've opened.

Regards,
Slavo
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center