varying access privileges among multiple xataface instances

A place for users and developers of the Xataface to discuss and receive support.

varying access privileges among multiple xataface instances

Postby 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.
S. T. Stoddard
ststoddard
 
Posts: 56
Joined: Mon Nov 05, 2007 4:10 pm
Location: Davis, CA

Postby 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
shannah
 
Posts: 4457
Joined: Wed Dec 31, 1969 5:00 pm


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 22 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved