Tuesday, June 2, 2009

DotNetNuke module development : Custom module permission

By default dotnetnuke provides role based permission in Page and module level. In module level it provides View/Edit permission by default. By using this module level permission you can give access to all View or Edit controls to any numbers of roles. But if you need this permission in more granular level, for example – you want to create an Article module where a regular user will be able to view any article and post comment (all view controls). You want another type of permission (ArticleWriter) which will be able to add new articles and to approve and publish those articles you need another permission (AritclePublisher) who will be able to add as well as approve any article. To implement this scenario you will need to add another two permission in your module.

 

By default DotNetNuke does not provide any easy way to do it without writing some codes. I have found one blog post in DotNetNuke.com and one article in CodeProject which explains the way to add new permissions in a module. I think these two articles will be very useful for anyone trying to add custom permission in his module.