-
- 151 Posts
I have made some custom tables with Migx so the client can log in as an editor and see the tables (in the topmenu components).
The problem is that I want to hide the component Migx, but when I do that (I set permission) than the access is denied for the selfmade Migx lists.
Is there a way to make sure the client cannot get into the Migx, but still can see the Migx-lists I made?
-
- 5,888 Posts
you can give your custom CMPs another action in the menues.
For example, change the menue - action 'index' to 'customexample'
And create a file 'core/components/migx/controllers/default/customexample.class.php' with something like that:
<?php
include ('index.class.php');
class MigxCustomexampleManagerController extends MigxIndexManagerController {
public function checkPermissions() {
$configs = $this->modx->getOption('configs',$this->scriptProperties);
//run MIGX - CMP only with given configs
if ($configs == 'custom'){
return true;
}
return false;
}
}
-
- 5,888 Posts
As soon, as you have a special permission set for the MIGX - menue (index-action), you will no longer have permission to the MigxIndexManagerController, which is used for any MIGXdb - CMP by default.
This is, what the custom controller, where you can check your own permissions, is good for.
-
- 10 Posts
I am also having this problem. I don't really know how to fix it for now.
Bruno(or someone elso) can you give an example where you have to put the config or what you have to set to make it work?
-
- 5,888 Posts
you just need to create your own controller with the customized checkPermissions()-method, like above and change the
action in the menue from 'index' to your own controller.