Telerik

Knowledge Base

Home/Web Content Management/Developer Network/Knowledge Base/How to enable Approve/Publish Permissions in modules (Sitefinity 3.6)

How to enable Approve/Publish Permissions in modules (Sitefinity 3.6)


Introduction



Although approve and publish permissions are disabled in the Generic Content based modules by default, which include the Generic Content, News, Blogs, Images and Documents and Events modules, these permissions can be enabled by editing the PermissionsView template.

Editing the Template


To add the necessary permissions, you must map the template and uncomment code by following these steps:

1.    Create the following file in the ~/App_Data/Configuration directory : Telerik.Sitefinity.Configuration.ControlsConfig.xml

2.    Add the code below to that file:

<?xml version="1.0" encoding="utf-8"?> 
<controlsConfig> 
    <viewMap> 
        <viewSettings hostType="Telerik.News.WebControls.Admin.NewsPermissionsView" layoutTemplatePath="~/Sitefinity/Admin/ControlTemplates/News/PermissionsView.ascx" /> 
    </viewMap> 
</controlsConfig> 


3.    Open your project Web.config file and make a change, such as pressing the space bar and backspace. This will rebuild the project and tell Sitefinity to use the PermissionsView.ascx template instead of the embedded templates

4.    Login to your Client.net account and click on downloads

5.    Download this file:

 

6.    Unzip that download and copy this files

\Sitefinity\Admin\ControlTemplates\News\App_LocalResources\PermissionsView.ascx.resx
\Sitefinity\Admin\ControlTemplates\News\PermissionsView.ascx

Into this directory in your Sitefinity project:

PermisionsView.ascx.resx - \Sitefinity\Admin\ControlTemplates\News\App_LocalResources
PermissionsView.ascx - \Sitefinity\Admin\ControlTemplates\News\

7.    In the ~/Sitefinity/Admin/ControlTemplates/News/PermissionsView.ascx file in your project, uncomment the lines below this phrase:

           ******* Uncomment this block when using workflow ********

8.    Assign roles approve and publish permissions as shown below:



9.    In your Web.config, find this line of code:

<add name="News" urlRewriteFormat="[Publication_Date]/[Title].aspx" urlDateTimeFormat="yy-MM-dd" urlWhitespaceChar="_" visible="False" defaultMetaField="Title" securityProviderName="" allowVersioning="True" applicationName="/News" versioningProviderName="" commentsModeration="true" connectionStringName="GenericContentConnection" type="Telerik.News.Data.DefaultNewsProvider, Telerik.News.Data" /> 


10.    Add this attribute to enable module workflow for news content:

allowWorkflow="true" 


Although the example above uses the news module, the same template exists for the other Generic Content based modules. The only thing that will change is the template mapping and the location of PermissionsView.ascx, which would be in the ~/Sitefinity/Admin/ControlTemplates/Events folder of the templates download. For more info on mapping templates, please refer to this article.

Article Info

Article relates to 3.6
Created by Joseph Anderson
Last modified by Joseph Anderson
Related categories: Workflow

Powered by Sitefinity ASP.NET CMS

Contact Us | Site Feedback | Terms of Use | Privacy Policy
Copyright © 2002-2010 Telerik. All rights reserved.