Dotclear

Changeset 3336:f6d429260c65 for inc


Ignore:
Timestamp:
09/02/16 06:51:55 (9 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Complete permissions controls for settings URLs, addresses #763

File:
1 edited

Legend:

Unmodified
Added
Removed
  • inc/admin/lib.moduleslist.php

    r3335 r3336  
    833833          if ($config || !empty($settings)) { 
    834834               if ($config) { 
    835                     $st[] = '<a class="module-config" href="'. 
    836                          $core->adminurl->get('admin.plugins',array('module' => $id,'conf' => '1')). 
    837                          '">'.__('Configure plugin').'</a>'; 
     835                    if ((!$check) || ($core->auth->isSuperAdmin()) || 
     836                         ($check && $core->auth->check($core->plugins->moduleInfo($id,'permissions'),$core->blog->id))) { 
     837                              $st[] = '<a class="module-config" href="'. 
     838                                   $core->adminurl->get('admin.plugins',array('module' => $id,'conf' => '1')). 
     839                                   '">'.__('Configure plugin').'</a>'; 
     840                    } 
    838841               } 
    839842               if (is_array($settings)) { 
     
    841844                         switch ($sk) { 
    842845                              case 'blog': 
    843                                    if ((!$check) || 
     846                                   if ((!$check) || ($core->auth->isSuperAdmin()) || 
    844847                                        ($check && $core->auth->check('admin',$core->blog->id))) { 
    845848                                        $st[] = '<a class="module-config" href="'. 
     
    849852                                   break; 
    850853                              case 'pref': 
    851                                    if ((!$check) || 
     854                                   if ((!$check) || ($core->auth->isSuperAdmin()) || 
    852855                                        ($check && $core->auth->check('usage,contentadmin',$core->blog->id))) { 
    853856                                        $st[] = '<a class="module-config" href="'. 
     
    858861                              case 'self': 
    859862                                   if ($self) { 
    860                                         if ((!$check) || 
     863                                        if ((!$check) || ($core->auth->isSuperAdmin()) || 
    861864                                             ($check && $core->auth->check($core->plugins->moduleInfo($id,'permissions'),$core->blog->id))) { 
    862865                                             $st[] = '<a class="module-config" href="'. 
Note: See TracChangeset for help on using the changeset viewer.

Sites map