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  |  

telerik -- supercharge your DNN websites
  Need Help?  
Professional technical support for DotNetNuke is available from DotNetNuke Corporation.
 


  Ads  
Engage Software - Training Partner for DotNetNuke
 


  Sponsors  

Meet Our Sponsors

SmarterTools
The Official Microsoft ASP.NET Website
Portal Webhosting - Hosting For Developers
Red-Gate Software
MaximumASP
SourceGear - Tools 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
5372 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
5372 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.

 


Efficion Consulting
A premier DotNetNuke consulting firm providing complete DNN services including: custom module development, skinning and design, installation and integration services.
www.efficionconsulting.com
DotNetNuke Training by Engage Software
Specializing in customized training, architecture and module solutions for large scale implementations lead by DNN Core Team Member Christopher Hammond.
engagesoftware.com
Smart-Thinker
DNN Modules for Social Networks for as low as $69 for 6 modules! We also maintain the DotNetNuke Directory - http://DNNDir.com
www.smart-thinker.com

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