hgs yĆ¼kleme
My Cart (0)  |  My Orders  |  My Downloads  |  My Auction  |  My Account  |  Help


Login |Register        Search

How to fix dnn portal permissions

                Print      Add To Favorite     Add To Watch List     Contact Author

Creator: host   5/24/2012 2:47:58 AM    Author: Sebastian Leupold   Source: http://www.dotnetnuke.com/Resources/Blogs/EntryId/2897/Fix-Portal-Permissions.aspx   Views: 2047    0    0  
Tags:
Portal Permission Dotnetnuke


Posted by: Sebastian Leupold
11/29/2010  

In some cases (it has been reported especially with new portals created in DNN 5.4.x), some portal settings are not properly initialized, which are required for DNN security to operate properly. The problem is easy to identify by the following situation in permission grids for new pages:

Page Permission issue

(note that the lock icon is assigned for all users instead of admins).



To fix this, you may run the following script from Host :: SQL:



/***********************************************************

 *  Script to fix AdministratorRoleId and RegisteredRoleId *

 *  in Portals table (common install issue in DNN 5.4.x)   * * for SQL Server 2008 and above *

 *                                                         *

 *  (c) Sebastian Leupold, 2010                            *

 ***********************************************************/





MERGE INTO {databaseOwner}{objectQualifier}Portals P

 USING {databaseOwner}{objectQualifier}Roles R On P.PortalID = R.PortalID 

 WHEN MATCHED

  AND R.RoleName Like 'Administrators'

  AND IsNull(P.AdministratorRoleId, -1) <> R.RoleID

   THEN UPDATE SET P.AdministratorRoleId = R.RoleId;

GO





MERGE INTO {databaseOwner}{objectQualifier}Portals P

 USING {databaseOwner}{objectQualifier}Roles R On P.PortalID = R.PortalID 

 WHEN MATCHED

  AND R.RoleName Like 'Registered Users'

  AND IsNull(P.RegisteredRoleId, -1) <> R.RoleID

   THEN UPDATE SET P.RegisteredRoleId = R.RoleId;

GO



Note: The script has been tested, however, as a best practice, always perform a database backup before running scripts.



After running the script, you need to restart the application to clear the internal cache, either from Host :: Host Settings menu item, by restarting IIS application pool or by re-saving web.config unchanged.

Rating People: 12   Average Rating:     

     DnnModule.com is built to provide DNN quality modules and DNN skins, some of them are free, some not. We wish these stuffs (free or not ) can be useful to you.

     Besides that, we also provide a full range of professional services, ranging from web site build, seo, system management, administration, support, senior consultancy and security services. We act as if your development project or network was ours, with care and respect. We are not satisfied until it works the way you want it to, and we don't silently ignore found issues as somebody else's problem.