Page 1 of 1

varying access privileges among multiple xataface instances

PostPosted: Tue Nov 03, 2009 11:42 am
by ststoddard
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.

PostPosted: Tue Nov 03, 2009 5:51 pm
by shannah
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