Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » subsystem export does not cover user roles
Re: subsystem export does not cover user roles [message #5301 is a reply to message #5299] Sun, 17 January 2016 23:54 Go to previous messageGo to previous message
kong is currently offline  kong
Messages: 90
Registered: December 2011
Member
Definitely should not include anything that has no contact with the exported subsystem. So, only the roles directly referenced by the subsystem will be sufficient. To make this happen I added the following code to file mnu_subsystem_s01.class.inc, function _exportSQL:
        // export the contents of MNU_ROLE used by this subsystem
        $taskobj->sql_select = 'DISTINCT mnu_role.*';
        $taskobj->sql_from   = 'mnu_role '
     		.'INNER JOIN mnu_role_task ON mnu_role_task.role_id=mnu_role.role_id '
       		.'INNER JOIN mnu_task AS task ON task.task_id=mnu_role_task.task_id ';
        $taskobj->sql_orderby = 'role_id';
        $data = $taskobj->getData_raw("task.subsys_id='$subsys_id'");
        $output = $this->_exportSqlData('mnu_role', $data, $output);
As to why this treatment for MNU_ROLE and not the other tables you mentioned, the distinction is that its primary key role_id is directly referenced in "...menu_export.sql" while the others are not (unless exported subsystem is MENU itself).
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: subsystem export does not cover menu tasks for roles' task access
Next Topic: Bug with 'require_once' file path
Goto Forum:
  


Current Time: Wed Dec 18 16:12:15 EST 2024

Total time taken to generate the page: 0.01293 seconds