How to setup gui permissions to xml files?



  • I'm working on gui package permissions to postfix forwarder.

    I can successfully  apply it on php files but in xml files the results are just a tab with no access to contents.

    here is postfix permission file

    
    global $priv_list;
    
    $priv_list['page-diagnostics-search-email'] = array();
    $priv_list['page-diagnostics-search-email']['name'] = "WebCfg - Diagnostics: Postfix search email";
    $priv_list['page-diagnostics-search-email']['descr'] = "Allow access to postfix search page.";
    $priv_list['page-diagnostics-search-email']['match'] = array();
    $priv_list['page-diagnostics-search-email']['match'][] = "postfix_search.php*";
    
    $priv_list['page-services-postfix-forwarder'] = array();
    $priv_list['page-services-postfix-forwarder']['name'] = "WebCfg - Services: Postfix forwarder (config).";
    $priv_list['page-services-postfix-forwarder']['descr'] = "Allow access to postfix forwarder service.";
    $priv_list['page-services-postfix-forwarder']['match'] = array();
    $priv_list['page-services-postfix-forwarder']['match'][] = "pkg_edit.php?xml=postfix_acl.xml&id=0";
    $priv_list['page-services-postfix-forwarder']['match'][] = "postfix_view_config.php*";
    $priv_list['page-services-postfix-forwarder']['match'][] = "postfix_about.php*";
    
    

    I've tried this with xml with no sucess.
    $priv_list['page-services-postfix-forwarder']['match'][] = "pkg_edit.php?xml=postfix_acl.xml*";
    $priv_list['page-services-postfix-forwarder']['match'][] = "pkg_edit.php?xml=postfix*";
    $priv_list['page-services-postfix-forwarder']['match'][] = "pkg_edit.phppostfix";

    The only way it works is allowing access to all packages
    $priv_list['page-services-postfix-forwarder']['match'][] = "pkg_edit.php*";


  • Rebel Alliance Developer Netgate

    There isn't a mechanism to match those (yet). It isn't supported that I'm aware of.



  • OK. I've changed the permission info to 'allow all package config'

    Thanks Jimp.


Log in to reply