Please enable JavaScript to view this site.

Navigation: Advanced topics > Events > Table events

Get Table Permissions

Scroll Prev Next More

Description

The GetTablePermissions event occurs after the table is initialized. Use this event to assign user a different set of permissions.

Syntax

GetTablePermissions($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:

 

$dw = date( "w" );
if ($dw==0 || $dw==6)
  $permissions="S";
return $permissions;

See also:

Security API: setPermissions

Security API :getPermissions

User group permissions

Choose Pages Screen

Event: After table initialized

Event: IsRecordEditable

 

Created with Help+Manual 7 and styled with Premium Pack Version 3 © by EC Software