varying access privileges among multiple xataface instances
Archived from the Xataface Users forum.
ststoddard — Tue Nov 03, 2009 11:42 am
Hi,
I have a xataface app on 3 different servers that I synchronize via binary logs. I want to permit data entry to only 2 of these servers for MOST users, and on the 3rd allow data entry to admin users only.
Is there a way to handle this? e.g. in the ApplicationDelegate class, perchance?
Thanks for any ideas.
shannah — Tue Nov 03, 2009 5:51 pm
In your getPermissions() method you could have something like:
- Code: Select all
function getPermissions(&$record){ if ( $_SERVER['HTTP_HOST'] == 'host1' ){ return Dataface_PermissionsTool::ALL(); } else { return Dataface_PermissionsTool::NO_ACCESS(); }
Or some variation on that.
-Steve