We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1764
    • 680 Posts
    I ran into a small issue with Module permissions. It should be a quick fix to get in before TP3.2.

    A person with Run module permissions only cannot access the Manage modules page.

    Near the top of the modules.static.action.php file you’ll find this code...

    if(!$modx->hasPermission('edit_module') && $_REQUEST['a']==106) {
    	$e->setError(3);
    	$e->dumpError();	
    }


    It should be
    if(!$modx->hasPermission('[b]exec[/b]_module') && $_REQUEST['a']==106) {
    	$e->setError(3);
    	$e->dumpError();	
    }


    This is such a simple fix I didn’t know if I should enter into the bugtracker or not. Let me know if you’d like me to.
      • 32963
      • 1,732 Posts
      Cool catch Adam

      Here’s what I did :

      if(!($modx->hasPermission('new_module')||$modx->hasPermission('edit_module')||$modx->hasPermission('execute_module')) && $_REQUEST['a']==106) {	
      	$e->setError(3);
      	$e->dumpError();	
      }


      I think this should allow users with new_module, edit_module, exec_module to be able to view the modules , corect?
        xWisdom
        www.xwisdomhtml.com
        The fear of the Lord is the beginning of wisdom:
        MODx Co-Founder - Create and do more with less.
        • 1764
        • 680 Posts
        Quote from: xwisdom at Aug 21, 2005, 08:50 PM


        if(!($modx->hasPermission('new_module')||$modx->hasPermission('edit_module')||$modx->hasPermission('execute_module')) && $_REQUEST['a']==106) { 
         $e->setError(3);
         $e->dumpError(); 
        }


        I think this should allow users with new_module, edit_module, exec_module to be able to view the modules , corect?

        Looks good. But your code uses ’execute_module’. I think it should be ’exec_module’. smiley