Home > Ask the Domino Experts > Domino Development Questions & Answers > Can File Upload Control be used in read mode
Ask The Domino Expert: Questions & Answers
EMAIL THIS

Can File Upload Control be used in read mode

Andre Guirard EXPERT RESPONSE FROM: Andre Guirard

Pose a Question
Other Domino Categories
Meet all Domino Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 02 February 2004
File Upload Control works only when the document is opened in edit mode. Is there some way I could use it in read mode also? The requirement is that any user should be able to attach a file irrespective of if he can edit or not.

>
There are a couple of approaches you can take here. I'm going to assume that there's a role in your database ACL called [Editor], and that any users who are in that role may edit the entire document, while other users may only add attachments.

The most straightforward way is always to open the form in edit mode, and give all users access to edit the documents, but only [Editor] users may edit fields other than the file attachment control. This can be done with hide formulas that test @UserRoles = "[Editor]" to decide whether to show editable fields or display-only fields, or with a controlled-access section that uses the role name as its editor formula. Note: If you use hide formulas, for best performance create a CFD number field named IsEditor and put the above formula in there. Your hide formulas can refer to this field; that way you only have to evaluate the expensive @UserRoles function once.

If you need better security, use a computed Authors field (formula: "[Editor]") to absolutely control access to the document, and use pass-thru HTML to add a <FORM> with the file attachment control in it. Make the submit URL of the form a ...SomeOtherForm?CreateDocument. Include (via passthru) a hidden field that contains the UNID of the containing read-only document. Add a WebQuerySave agent to SomeOtherForm; make it run with the server's access. The agent would use the UNID to find the read-only document, then copy the attachment over and use Print to generate HTML that'll redisplay the read-only document. It might not be worth the trouble, depending how worried you are about people trying to break security.

Do you have comments on this Ask the Expert Q&A? Let us know.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
Domino Development
Can I create and copy Microsoft Excel spreadsheets with LotusScript?
'Illegal circular use: Audit Trail' error when opening Lotus Notes docs
How to make computed fields recalculate
Sending and logging faxes from Lotus Notes and Domino
Accessing documents in a Lotus Notes database
Adding an action to the Lotus Notes right-click menu
Writing temporary text files that email as attachments
Trapping the on-click event of a radio button
Copying a form object using LotusScript
Connecting to a remote DB2 server with LEI

Development Security for Lotus Notes Domino
Top 10 Lotus Notes/Domino coding and development tips of 2008
Lotus Notes access error: 'database is not opened yet'
Top 10 Lotus Notes Domino programming and development tips of 2007
Verify Lotus Notes user access to Web pages
A bevy of Notes/Domino development tips
How to protect your Lotus Notes application design
A smorgasbord of Notes/Domino development tips
Ajax threats worry researchers
New chapter and verse on Ajax security
Java developers can't afford to ignore app security

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



Lotus Notes Domino on Blackberry and mobile devices
HomeTopicsITKnowledge ExchangeTipsAsk the ExpertsMultimediaWhite PapersDomino IT Downloads
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts