We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 10313
    • 375 Posts
    Hello,

    I have a user role with authorisation to empty the trash can.

    Further I have different user groups with different document groups.

    What will happen if a user who has only access to branch A in the document tree empties the trash can? Will the deleted documents in the can from the other branches be deleted too?

    Thanks in advance
    Martin
      • 4172
      • 5,888 Posts
      this will allways remove all documents which have deleted=1.
      See /manager/processors/remove_content.processor.php:

      //'undelete' the document.
      $sql = "DELETE FROM $dbase.`".$table_prefix."site_content` WHERE deleted=1;";
      $rs = mysql_query($sql);


      as a workarround you can try with OnBeforeEmptyTrash set all deleted to somthing other than 1 (2 for example) which are not in his document-groups.

      And reset them in OnEmptyTrash back to deleted=1.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 10313
        • 375 Posts
        Thanks for the answer and proposal for the workaround. But then I will setup a different user role wich cannot empty the trash. I think that’s enough in my case.

        Greetings
        Martin