Search these areas:
Support Forums
Product Info

-DataWeb: What's New
-Creating an Application
-The DataWeb Designer
-Application Management
-Data Tables
-Data Tables
-Data Analysis
-Object Model
-Full-Text Search
-Domain and Email Hosting
-HotBlock Modules
-Account Management
-New Responsive UI Module

DataWeb Help
Support Forums
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:
  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.

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