First you need to get the Module ID of the repository instance. The easiest way is to go to the module settings and look at the URL
You'll see something like this
http://www.yourdomain.com/Downloads/tabid/100/ctl/Module/ModuleId/920/Default.aspx
The 920 in this example which follows the ModuleId parameter is the number you need
Login using the Host account, then go to the Host->SQL page
enter the following SQL into the textbox and click Execute
select RoleID, RoleName from Roles
That will give you a list of your existing Security Roles and their IDs. For example:
RoleId |
RoleName |
0 |
Administrators |
1 |
Registered Users |
2 |
Subscribers |
Now, clear the text box and enter the following, then click Execute
select SettingName, SettingValue from ModuleSettings where SettingName like '%roles' and ModuleId = 920
of course, replace 920 with the Id of your repository instance Id
That will show you the settings for that particular module instance that relate to roles
You'll see something like this...
SettingName |
SettingValue |
commentroles |
;-1;0; |
downloadroles |
;-1;0;3; |
moderationroles |
;0; |
ratingroles |
;-1;0; |
uploadroles |
;0; |
Now, look for a value that doesn't exist in your roles table. In this example, if you look back at the Roles table, I only have 3 roles 0, 1 and 2. But if you look at the settings for my module, in the downloadroles setting I see a value of 3, which doesn't exist. I need to remove that value.
Note that each value starts with a ; and ends with a ; and has a ; between each value, so to remove the 3 from the download roles, I would execute the following SQL
update ModuleSettings set SettingValue = ';-1;0;' where SettingName = 'downloadroles' and ModuleId = 920
and that will update my downloadroles and remove the 3, that should do it. You can run the
select SettingName, SettingValue from ModuleSettings where SettingName like '%roles' and ModuleId = 920
SQL again to make sure everything looks good. Make sure each of the roles listed in each of the roles settings exist in your Roles table.