Small width layout Medium width layout Maximum width layout Small text Medium text Large text
     Search
Downloads Downloads Directory Directory Forums Forums Forge Forge Blogs Blogs        Marketplace Marketplace Careers Program Careers
Community › Forums Register  |  

Vote for DotNetNuke as your choice for winner of this year's PackT Open Source CMS Award
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
 


  Sponsors  

Meet Our Sponsors

R2integrated - formerly bi4ce
Jango Studios - Skins, Modules and Hosting for DotNetNuke
eUKhost.com is commited to offer exceptional UK Windows Web Hosting solutions with quality 24x7 technical support.Our plans support ASP.Net, ASP, ASP.NET Ajax extensions, XML, MSSQL, MySQL, PHP,DNN, multiple domains and Shared SSL as standard.
SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
 


DotNetNuke Forums
 
  Forum  DotNetNuke® Pro...  Documents Modul...  Delete Option in Document Module
Previous Previous
 
Next Next
New Post 1/9/2008 7:09 AM
User is offline http://www.factorycodes.com
30 posts
10th Ranked


Delete Option in Document Module 

How can i limit the delete option only for the administrators ?

Suppose A & B are registered users.User A uploaded a file.User B can delete the file uploaded by User A.I want to avoid this.I want to make the delete option available only to the Administrators.

How can i achieve this ?

 
New Post 1/9/2008 11:50 AM
User is offline Mitch Sellers
5364 posts
www.mitchelsellers.com
3rd Ranked




Re: Delete Option in Document Module 

You would need to modify the code that exists in the EditDocument.ascx control to do a permissions check before you allow deletion.

It should be a fairly simple change.  One thing to remember also is that deleting an item from the documents module only deletes the link, it doesn't delete the file.

Please feel free to contact me directly if you need assistance.


-Mitchel Sellers
MCITP, MCPD, MCTS
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Consulting Quotes, and DNN Technical Support Services

I reccomend 3Essentials for shared hosting and BaseCamp for project management
 
New Post 1/10/2008 4:31 AM
User is offline http://www.factorycodes.com
30 posts
10th Ranked


Re: Delete Option in Document Module 

Can you provide me the code to do that  ?

 
New Post 1/10/2008 6:09 AM
User is offline Mitch Sellers
5364 posts
www.mitchelsellers.com
3rd Ranked




Re: Delete Option in Document Module 

I can't test this code anymore as I do not have VS 2003 installed so I cannot edit the current version of the documents module, I can only work with the new one.

In the EditDocs.ascx control, in the page_load event there is the following IF statement

' If the page is being requested the first time, determine if an

 

' document itemId value is specified, and if so populate page

 

' contents with the document details

If Not Common.Utilities.Null.IsNull(ItemID) Then

You will need to add something like

If UserInfo.IsInRole("Administrators") Then

    cmdDelete.Enabled = True

Else

    cmdDelete.Enabled = False

Ensure that your admin role is aministrators, you will then need to re-build the module to make the changes complete.


-Mitchel Sellers
MCITP, MCPD, MCTS
CEO/Director of Development - IowaComputerGurus Inc.
LinkedIn Profile

Visit mitchelsellers.com for my mostly DNN Blog and support forum.

Visit IowaComputerGurus.com for free DNN Modules, DNN Consulting Quotes, and DNN Technical Support Services

I reccomend 3Essentials for shared hosting and BaseCamp for project management
 
Previous Previous
 
Next Next
  Forum  DotNetNuke® Pro...  Documents Modul...  Delete Option in Document Module
 


Forum Policy

These Discussion Forums are dedicated to the discussion of the DotNetNuke Web Application Framework.

For the benefit of the community and to protect the integrity of the project, 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 DotNetNuke.
2. Discussion or promotion of DotNetNuke product releases under a different brand name are strictly prohibited.
3. No Flaming or Trolling.
4. No Profanity, Racism, or Prejudice.
5. Site Moderators have the final word on approving/removing a thread or post or comment.
6. English language posting only, please.

 


DNN Photo Gallery
Complete Photo Gallery Management!
www.dnnPhotoGallery.com
R2i - Delivering Serious DNN Services & Solutions
Award Winning Design, Skin construction, Custom Modules and Consulting Services for the Enterprise organization. R2i is the DNN:Map module Project Lead and one of the largest DNN service providers with offices in New York City, Virginia and Baltimore.
www.bi4ce.com
"SalarO" Skinning Graphic Design Branding Services
SalarO develops packaged & custom skins for your DNN at prices you can afford. SalarO is also developing Module development, Hosting, Branding/Logo design as well as Content Transfer Services to complement the core skinning solutions.
www.salaro.com

DotNetNuke Corporation   Terms Of Use  Privacy Statement
DotNetNuke®, DNN®, and the DotNetNuke logo are trademarks of DotNetNuke Corporation
Hosted by MaximumASP