HI,
I created a local application and tried to make it work on domain. Changed database config, but when I point to the root of my application folder what I get is part of ApplicationDelegate.php, which is the same that it is working on my local installation. What I get in browser (as text) is this:
getLoggedInUser(); if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS(); // if the user is null then nobody is logged in... no access. // This will force a login prompt. $role = $user->val('Role'); $app =& Dataface_Application::getInstance(); $tables =& $app->_conf['_tables']; if ($role=="EDIT"){ unset($tables['resultats_classificacio']); unset($tables['users']); } return Dataface_PermissionsTool::getRolePermissions($role); // Returns all of the permissions for the user's current role. } /* function after_action_new(){ $app =& Dataface_Application::getInstance(); $query =& $app->getQuery(); $query['-action'] = 'browse'; $url = $app->url($query).'&--msg='.urlencode('Record added. You may add another record'); header("Location: $url"); exit; } */ } ?>
That is part of my ApplicationDelegate.php:
<?
/**
* A delegate class for the entire application to handle custom handling of
* some functions such as permissions and preferences.
*/
class conf_ApplicationDelegate {
/**
* Returns permissions array. This method is called every time an action is
* performed to make sure that the user has permission to perform the action.
* @param record A Dataface_Record object (may be null) against which we check
* permissions.
* @see Dataface_PermissionsTool
* @see Dataface_AuthenticationTool
*/
function getPermissions(&$record){
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
// if the user is null then nobody is logged in... no access.
// This will force a login prompt.
$role = $user->val('Role');.......
I have other xataface applications working well in my domain, but don't know what is causing this.
Thanks.