1. How do i require users to log in to access the site in xataface 2.0? This doesn't work anymore.
- Code: Select all
<?
class conf_ApplicationDelegate {
function getPermissions(&$record){
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
if ( !isset($user) ) return Dataface_PermissionsTool::NO_ACCESS();
$role = $user->val('Role');
return Dataface_PermissionsTool::getRolePermissions($role);
// Returns all of the permissions for the user's current role.
}
}
?>
2. Where do i define permissions for tables such as users.php? The code below also doesn't work anymore for xataface 2.0.
- Code: Select all
<?
class tables_users {
function getPermissions($record){
if ( isAdmin() ) return null;
$perms['register'] = 1;
$perms['view']=1;
return $perms;
}
function role__permissions(&$record){
if ( isAdmin() ) return null;
return Dataface_PermissionsTool::READ_ONLY();
}
function username__permissions(&$record) {
if (!isAdmin() ) return array('edit'=>0);
return null;
}
}
?>
3. How do I change the logo if Im using the g2 module?
Thanks in advance.