Hi Steve,
Could you give me the URL of the __filters__ manual page ?
Thank you
Jean
__filters__ manual page
3 posts
• Page 1 of 1
__filters__ manual pageHi Steve,
Could you give me the URL of the __filters__ manual page ? Thank you Jean
hmmm.. I can't seem to find it right now.
Practically speaking the __filters__ section is not all that useful because you can't include very much environment information into the filters. Using the setSecurityFilter() method is usually more effective. Here is a quick example: In the fields.ini file for say the users table:
This would effectively filter the users table to only show users with group_id=10. You can see how this isn't all that helpful. A more flexible solution involving the setSecurityFilter() method: In the delegate class for the users table:
The above would be the equivalent to the __filters__ example. More useful if we apply different filters for different users: e.g.
This will only set the filter on non-admin users (assuming that you have defined a function isAdmin() to tell you if the current user is an admin user. Hope this helps. -Steve
Another thing used in my example that I realize may not have been well documented is the init() method. If you define a method in your delegate class as follows:
This method will be call once just after the table is loaded for the first time. It allows you to do initialization stuff (like security filters) that you only want to happen once. Note that it takes a single parameter: a Dataface_Table object of the table that is being initialized. -Steve
3 posts
• Page 1 of 1
Who is onlineUsers browsing this forum: No registered users and 8 guests |