Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Rickey Steinke: "Folks, I wanted to drop a line and give you a fanatic thank you. I have a project due for my computer application course and without PHP Generator I never would have gotten it done with the professional results your product produced. My sincerest gratitude to each and every team member who brought this program to light".
Gabriela Arsene: "MySQL PHP Generator is really excellent! A very useful, easy to use tool and above all it is free, saving a lot of time and money to a developer! Great job! Congratulations to all the people who work at this project".

More

Add your opinion

PHP Generator for MySQL online Help

Prev Return to chapter overview Next

class PermissionSet

PermissionSet is a simple class that encapsulates object permissions and provide methods to query/change all or certain permissions. An instance of this class is passed to the OnGetCustomPagePermissions event to customize page-level permissions.

 

Querying permissions

The following methods can be used to query the current state of a class instance. All functions return Boolean.

 

 

Signature

Description

hasViewGrant()

Returns whether the current user can view records.

hasAddGrant()

Returns whether the current user can add records.

hasEditGrant()

Returns whether the current user can edit records.

hasDeleteGrant()

Returns whether the current user can delete records.

hasAdminGrant()

Returns whether the current user has admin privileges for the current page.

 

 

Changing permissions

The following methods can be used to change the current state of a class instance. All parameters are Boolean.

 

Signature

Description

setViewGrant($value)

Allows the current user to view records.

setAddGrant($value)

Allows the current user to add records.

setEditGrant($value)

Allows the current user to edit records.

setDeleteGrant($value)

Allows the current user to delete records.

setAdminGrant($value)

Grants the current user admin privileges for the current page.

setGrants($view, $add, $edit, $delete)

Sets all page permissions at once.



Prev Return to chapter overview Next