Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-15510

website toolbar shows up in edit view even if user does not have access to it

    XMLWordPrintable

Details

    Description

      Solvable by adding something like:

      {if fetch( 'user', 'has_access_to', hash( 'module', 'websitetoolbar', 'function', 'use' ) )}
      

      Same goes for version view variant of toolbar, but should maybe consider to add functions to control this, something like:

      $FunctionList['use'] = array( 'Class' => array( 'name'=> 'Class',
                                                      'values'=> array(),
                                                      'path' => 'classes/',
                                                      'file' => 'ezcontentclass.php',
                                                      'class' => 'eZContentClass',
                                                      'function' => 'fetchList',
                                                      'parameter' => array( 0, false, false, array( 'name' => 'asc' ) ) ) );
      $FunctionList['use_edit'] = $FunctionList['use'];
      $FunctionList['use_versionview'] = $FunctionList['use'];
      

      To also support class limitation, we should look into using has_access_to_limitation operator in ezjscore (see example in ezstarrating).

      Attachments

        Activity

          People

            unknown unknown
            andre1 andre1
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: