Hi, created a custom login page on a parent portal, set the site settings to use it but silly forgot to set all user permissions on the page.. now I cannot log in.
Is there a way to set permission via the sql database and if so where and how?
No manual login does not work either Joe, even though I was able to login as host via another portal and in host site settings for the offending portal remove the link for login page back to "not specified" restarted IIS and recycled app pool but it still does not work.
That's why I hoped it can be done via SQL, it must be a common mistake so was hoping someone has a query or can point out any steps to take. As it is a multi portal instance (12 websites) I am anxious not to cause a domino effect.
I saw a post where it was mentioned to set the custom login page I created to deleted by marking the "IsDeleted" flag in the TabModules table. then restart everything and all should come up correctly and the portal should revert to the generic default login. Is that worth a go??
In case someone is still trying to find a solution, this was a fix for me. You need CRUD access to the database either through the SQL tool in Host or SQL Management Studio.
We need to add a role to the TabPermissions table to configure the offending "Login" page to be accessible by "unauthenticated users". It will not work with "All Users" permission as the users have not authenticated themselves before they try to access login.
Don't forget to backup your site and database first, just in case. I cannot guarantee this will work for everyone. it is worth checking all columns exists and bring back a result in a select, before running an update
1. Find the tabID of the login page (you can use this handy little script). SELECT portalID, TabID, TabName, Title, TabPath, IsVisible AS InMenu, IsSecure, SkinSrc, ContainerSrc, SUBSTRING(( SELECT '; ' + ISNULL(r.RoleName, CONVERT(NVARCHAR, tp.RoleID)) + ' [' + SUBSTRING(( SELECT ', ' + PermissionName FROM TabPermission tpSub INNER JOIN Permission p ON p.PermissionID = tpSub.PermissionID WHERE tpSub.TabID = tp.TabID AND tpSub.RoleID = tp.RoleID FOR XML PATH('')), 3, 1000) + ']' FROM TabPermission tp LEFT OUTER JOIN (SELECT RoleID, RoleName FROM Roles UNION ALL SELECT -1, 'All Users' UNION ALL SELECT -2, 'Registered' UNION ALL SELECT -3, 'Unauthorized') r ON tp.RoleID = r.RoleID
WHERE tp.TabPermissionID IN (SELECT MIN(TabPermissionID) FROM TabPermission tpMin WHERE tpMin.TabID = Tabs.TabID GROUP BY tpMin.RoleID ) ORDER BY tp.RoleID FOR XML PATH('')), 3, 1000) AS Permissions FROM Tabs WHERE PortalID in(0) //replace with portal id --and tabid in() AND IsDeleted = 0 ORDER BY TabPath
2. Once you have the tabID amend and run the following Update. UPDATE tabpermission SET RoleID = -3 WHERE tabID = "YourTabID" AND PermissionID = 3
The login page will be accessible now, so login and update the permissions as required for the login page
These Forums are dedicated to the discussion of DNN Platform.
For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:
Awesome! Simply post in the forums using the link below and we'll get you started.