Modules are not working
Archived from the Xataface Developers forum.
jerryevo — Mon Jan 28, 2013 2:19 pm
I have added following into my conf.ini
- Code: Select all
[_modules] modules_DataGrid="modules/DataGrid/DataGrid.php" modules_summary="modules/Summary/summary.php" modules_switchuser="modules/SwitchUser/switch_user.php"
Modules are in their proper paths (like above, letter case is identical).
But even user with ADMIN nor MANAGER role desn’t see “Grid” and “Summary” tabs nor switch user button.
I’m using Xataface 2.0alpha1
Any ideas what to do?
jerryevo — Fri Feb 01, 2013 3:34 am
Any ideas?
shannah — Mon Feb 04, 2013 9:51 am
What does your getPermissions() method look like?
jerryevo — Mon Feb 04, 2013 12:41 pm
- Code: Select all
- `function getPermissions(&$record){
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();if ( !isset($user) ) {
return Dataface_PermissionsTool::NO_ACCESS();
}
$role = $user->val(‘Rola’);
return Dataface_PermissionsTool::getRolePermissions($role);
}`
User I’m using for tests has field “Rola” set to “ADMIN”
shannah — Mon Feb 04, 2013 12:50 pm
The ADMIN role is actually different than Dataface_PermissionsTool::ALL().
For the actual admin (i.e. super user) you may want to use Dataface_PermissionsTool::ALL(). It gives access to all permissions in the system. The ADMIN role includes most of the built-in permissions, but permissions added by you or modules are not automatically added to the ADMIN role.
You can add permissions to the ADMIN role using the notation:
- Code: Select all
[ADMIN > ADMIN] permission1=1 etc...
In your application’s permissions.ini file. Check the permissions.ini files for each module to see which permissions you need to permit.
-Steve
jerryevo — Mon Feb 04, 2013 12:55 pm
I will try to check it.
It is clear that such great product have to had updated documentation
jerryevo — Mon Feb 04, 2013 1:39 pm
OK, seems to work!
There was need to update actions.ini file too
[ADMIN > ADMIN] is the same as [ADMIN extends ADMIN]?
shannah — Mon Feb 04, 2013 2:00 pm
Oh… oops. I think [ADMIN extends ADMIN] is correct. The > notation is for actions… it may work for permissions too… I’ll have to check to refresh my memory.
-Steve
jerryevo — Mon Feb 04, 2013 2:03 pm
Just check in documentation
Seems that both notations work.