Search these areas:
Help
Support Forums
Product Info



-Introduction
-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Views
-Templates
-Components
-Data Analysis
-Members
-Security
-Importing
-Exporting
-FTP
-JavaScript
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-Glossary
-New Responsive UI Module





DataWeb Help
Support Forums
Tutorial
Script Library
Knowledge Base

Home > Support

Support Forum



limit who can delete records
geoffk asked:
I have a table that only administrators should be able to delete records on.

How do I do this?
I  can hide the delete button but and add some stuff in the ondelete action.
Would this be enough? How do I hide the record selectors for non-admins?
 
  brendanx responded:
  As you point out, the crucial step is, of course, the BeforeDelete handler that actually makes it impossible for non-Administrators to delete records no matter what the view formatting.

On hiding the record selectors, it looks like the 'recordselectors' attribute on the 'ws:dataregion' tag accepts #-substitution, so I think the following would achieve your desired result:

<ws:dataregion ... recordselectors="#User.isAdmin()#">

Because the property page UI for this attribute is normally a checkbox, you will have to use the source editor to make the above modification.
 
  geoffk responded:
  cool
thanks
 
  brendanx responded:
  DataWeb considers this issue closed.
If you have additional questions or comments about this issue, please open it again.
If you have questions about a different topic please open a new support question.

Thanks,
DataWeb Support
 
  Please Log On
or create your own DataWeb Account.
Affiliate | Partner | Terms of Use | Privacy Policy | Contact Us | Pricing | Bring DataWeb In-House    
DataWeb, 720 North 10th Street, A #145, Renton, Washington 98057 *425-583-5970* Fax 484-770-4706* Email Us