Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsGalleryGalleryuser canuser can't download picture, how to give access
Previous
 
Next
New Post
7/26/2006 2:44 PM
 

O.K I need simple instructions to get this fix implemented. I am using MS SQL Server Mananger 2005 to connect to my SQL database for my site, but am still unable to follow your instructions:

Adeian wrote

Create a role (I'll call it DownloadPhoto) and from the Gallery configuration screen add this role as one of the authorized download roles. 

This part is easy and have created a new role

Adeian wrote

Find the moduleID of the Gallery module.  You can find this in the Modules table on the database. (Select moduleid from dbo.Modules where ModuleTitle = 'Gallery') Change that if your moduletitle is different.

In the ModuleSettings table find the row with your moduleID and SettingName = DownloadRoles.

This will have the ID of the role you just gave download permissions to (in my case it looks like ;3).  Change the number to the name of the role.

This part I have no idea where to look. I am using DNN3.1.1 and when I connect to my SQL server I can find Nothing like dbo.Modules.

Please can you give me some more help on fixing this error in the Gallery module.

Thanks

 
New Post
7/27/2006 1:35 PM
 

O.K update. I have found dbo.module

Now when I go in there these are the containers I can see:

Colmns
Keys
Constraints
Triggers
Indexes
Statistics

Now my problem, is I have no idea what I am supposed to go into to edit what? Please can someone tell me in plain English?

Thanks

 
New Post
8/11/2006 8:06 PM
 

Right I have taken a break from this fix and come back to it. I have found the sections I need to alter, however this still doesn't work. Are you sure this fix is correct???

I run DNN 3.1.1, does this fix work on this version of DNN???? I have modified the ID of the Download Role from 12 for my role to GalleryDownload. Then cleared the cache from the site. Logged on with my account that has rights to download and still nothing.

Please has anyone got any suggestions?? or am I talking to myself on these forums????

 
New Post
8/14/2006 11:49 AM
 
Ok, I've been checking out this problem for an hour (using the source code for the gallery) and I've found the same conclusion as posted earlier:

The popup that fills the Download roles will return an integer (a number like 1,2, 3, etc) and insert that integer into the ModuleSettings table in the DNN database. The record we're looking for is called "DownloadRoles".

Looks OK, storing ID's instead of names is generally a good idea and is implemented thru out DNN.

Problem comes when the Gallery module gets this value from the database and then tries to verify if the user is a member of any of the roles specified in the DownloadRoles setting in the ModuleSettings table.

The function that checks this is called IsInRole (In UserInfo). The function checks for the names of the roles in the database, but the function input parameter is an integers

Question is what is correct: should UserInfo.Roles contain names or ints? From the rest of the code, it is not clear. For example: the constants like glbRoleAllUsersName uses a string, but in PortalController, this value is lookup up to an int on several occasions (like in ParseFolderPermissions).

A fix could be to add a Select Case to UserInfo.IsInRole that looks up the id's and then checks.

Anyway:

The quick fix is as follows:

Fill in the downloadroles in the Gallery as you would do normally.

Now in SQL Server Management Studio, log in to your database, and open a New Query and select your DNN database

SELECT * FROM ModuleSettings WHERE SettingName = 'DownloadRoles'

You will see the entry that contains something like ";1" or maybe ";1;3". These are the integers that need replacement.

SELECT * FROM Roles

This will give you all roles.

Find the role you need and copy that to the clipboard

UPDATE ModuleSettings
SET SettingValue = '';WHERE ModuleId = AND SettingName = 'DownloadRoles'

This should fix it.
 
New Post
8/15/2006 12:47 PM
 
The source code for the latest version 3.01.12 hasn't been made availble yet so if you make these changes and recompile the dll you should make sure you have 3.0.1.11 loaded.

Paul Davis
 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsGalleryGalleryuser canuser can't download picture, how to give access


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out