mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
MINOR fix permissions
FEATURE add 'view site tree as' functionality. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/branches/2.4@98025 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
f3d0a4f54a
commit
80b35d15f2
@ -1321,7 +1321,7 @@ JS;
|
|||||||
'category' => _t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access'),
|
'category' => _t('Permission.CMS_ACCESS_CATEGORY', 'CMS Access'),
|
||||||
'sort' => -100
|
'sort' => -100
|
||||||
);
|
);
|
||||||
|
|
||||||
if (isset($perms['CMS_ACCESS_ModelAdmin'])) unset($perms['CMS_ACCESS_ModelAdmin']);
|
if (isset($perms['CMS_ACCESS_ModelAdmin'])) unset($perms['CMS_ACCESS_ModelAdmin']);
|
||||||
|
|
||||||
return $perms;
|
return $perms;
|
||||||
|
@ -28,7 +28,7 @@ abstract class CMSSiteTreeFilter extends Object {
|
|||||||
}
|
}
|
||||||
|
|
||||||
$leftAndMain = new CMSMain();
|
$leftAndMain = new CMSMain();
|
||||||
$tree = $leftAndMain->getSiteTreeFor('SiteTree', isset($_REQUEST['ID']) ? $_REQUEST['ID'] : 0, null, null, array($this, 'includeInTree'));
|
$tree = $leftAndMain->getSiteTreeFor('SiteTree', isset($_REQUEST['ID']) ? $_REQUEST['ID'] : 0, null, null, array($this, 'includeInTree'), count($this->ids));
|
||||||
|
|
||||||
// Trim off the outer tag
|
// Trim off the outer tag
|
||||||
$tree = ereg_replace('^[ \t\r\n]*<ul[^>]*>','', $tree);
|
$tree = ereg_replace('^[ \t\r\n]*<ul[^>]*>','', $tree);
|
||||||
|
@ -57,6 +57,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
public function getEditForm($id) {
|
public function getEditForm($id) {
|
||||||
$record = null;
|
$record = null;
|
||||||
|
|
||||||
|
if (($id == 'root' || $id == 0) && $this->hasMethod('getRootForm')) return $this->getRootForm($this, 'EditForm');
|
||||||
|
|
||||||
if($id && $id != 'root') {
|
if($id && $id != 'root') {
|
||||||
$record = DataObject::get_by_id($this->stat('tree_class'), $id);
|
$record = DataObject::get_by_id($this->stat('tree_class'), $id);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user