Add a Before Form script to your form with the following code:
// Add some products to the table
tables.products.insertRow();
tables.products.product_id.value = 1;
tables.products.name.value = "Gaming Laptop";
tables.products.price.value = 499.99;
tables.products.insertRow();
tables.products.product_id.value = 2;
tables.products.name.value = "Netbook";
tables.products.price.value = 249.99;
// These products are in the laptops subcategory of the computers category
var productCategory = "computers/laptops/";
// Modify the repeater behaviour so that the Edit button is only
// displayed for products that the current user is authorized to edit
var products = tables.products.getRows();
while (products.next()) {
var productFullName = productCategory + tables.products.name.value);
if (system.securityManager.isAuthorized("product", productFullName, "edit")) {
controls.editBtn.show();
} else {
controls.editBtn.hide();
}
}