Description
The GetTablePermissions event occurs after the table is initialized. Use this event to assign user a different set of permissions.
Syntax
public XVar GetTablePermissions(dynamic permissions)
Arguments
permissions
a string containing permissions calculated for a given user and table.
Return value
a string containing permissions calculated for a given user and table.
•A - Add;
•D - Delete;
•E - Edit;
•S - List/View/Search;
•P - Print/Export;
•I - Import;
•M - Admin option. A user can see all records in the table.
Applies to pages
All table specific pages like List, Print, Edit, List, Add, Export etc.
Example
Prohibit the editing of table data on the weekends:
dynamic dw = XVar.Clone(MVCFunctions.date(new XVar("w")));
if(dw == XVar.Pack(0)) || dw == XVar.Pack(6))
{
permissions = new XVar("S");
}
return permissions;
See also:
•Event: After table initialized