We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43864
    • 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?
      • 4172
      • 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;
          }
          
      }
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 44580
        • 189 Posts
        It can also be done via permissions (see this thread: http://forums.modx.com/thread/95582/log-into-manager-without-sudo#dis-post-517750). I have an editor set up that can only see the MIGX CMPs that I set up (plus the Create User function) and nothing else. Specifically, to remove the MIGX extra menu, refer to Bob's hint in reply 6 of the thread.
          • 4172
          • 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.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 44718
            • 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?
              • 4172
              • 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.
                -------------------------------

                you can buy me a beer, if you like MIGX

                http://webcmsolutions.de/migx.html

                Thanks!