DNN Sercurity Setting Locked Issue (DNN 5.5.0 and DNN 5.6.0)


When you create a child portal from a template in DNN 5.5.0 and DNN 5.6.0 (maybe more versions), you may run into an issue: you cannot modify any page’s security settings any more. They are locked!

You may find the dicussion from DotNetNuke forum at this link and a script from Chris Hammod:

http://www.dotnetnuke.com/Resources/Forums/tabid/795/forumid/108/threadid/358090/scope/posts/threadpage/3/Default.aspx

Here is another SQL script to fix the issue:

UPDATE

 

p

SET

 

p.AdministratorRoleId = d.AdministratorRoleId

,

 

p

.RegisteredRoleId = d.RegisteredRoleId 

FROM

 

 

(

SELECT

 

PortalID, [Administrators] AS AdministratorRoleId

,

 

[Registered Users] AS RegisteredRoleId FROM (SELECT PortalID, RoleID, RoleName FROM {databaseOwner}{objectQualifier}Roles ) src

PIVOT

 

 (MIN(RoleID) FOR RoleName IN ([Administrators],[Registered Users]))

pvt 

 

)

 

d INNER JOIN {databaseOwner}{objectQualifier}Portals p ON d.PortalID=p.PortalID

You can run the above script from your DNN site under HOST>SQL Run as Script (make sure your have a backup copy of your database).

If you want to run the script from SSMS, here is the copy without {databaseOwner}{objectQualifier}:

UPDATE

 

p

SET

 

p.AdministratorRoleId=d.AdministratorRoleId

,

 

p

.RegisteredRoleId =d.RegisteredRoleId

FROM

 

( SELECT PortalID, [Administrators] as AdministratorRoleId

,

 

[Registered Users] as

RegisteredRoleId  

FROM (SELECT PortalID, RoleID, RoleName from roles ) src

PIVOT

 

(MIN(RoleID) FOR RoleName IN ([Administrators],[Registered Users]))pvt

)

 

d INNER JOIN dbo.Portals p ON d.PortalID=p.PortalID

Advertisements


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s