mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Added to main CMS controllers
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@49888 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
6546f66ebb
commit
f7474bf059
@ -14,6 +14,21 @@
|
|||||||
class AssetAdmin extends LeftAndMain {
|
class AssetAdmin extends LeftAndMain {
|
||||||
static $tree_class = "File";
|
static $tree_class = "File";
|
||||||
|
|
||||||
|
static $allowed_actions = array(
|
||||||
|
'addfolder',
|
||||||
|
'deletefolder',
|
||||||
|
'deletemarked',
|
||||||
|
'deleteUnusedThumbnails',
|
||||||
|
'doUpload',
|
||||||
|
'getfile',
|
||||||
|
'getsubtree',
|
||||||
|
'movemarked',
|
||||||
|
'removefile',
|
||||||
|
'save',
|
||||||
|
'savefile',
|
||||||
|
'uploadiframe',
|
||||||
|
);
|
||||||
|
|
||||||
public function Link($action=null) {
|
public function Link($action=null) {
|
||||||
if(!$action) $action = "index";
|
if(!$action) $action = "index";
|
||||||
return "admin/assets/$action/" . $this->currentPageID();
|
return "admin/assets/$action/" . $this->currentPageID();
|
||||||
|
@ -18,6 +18,36 @@ class CMSMain extends LeftAndMain implements CurrentPageIdentifier, PermissionPr
|
|||||||
|
|
||||||
static $subitem_class = "Member";
|
static $subitem_class = "Member";
|
||||||
|
|
||||||
|
static $allowed_actions = array(
|
||||||
|
'addmember',
|
||||||
|
'addpage',
|
||||||
|
'buildbrokenlinks',
|
||||||
|
'canceldraftchangesdialog',
|
||||||
|
'compareversions',
|
||||||
|
'createtranslation',
|
||||||
|
'delete',
|
||||||
|
'deletefromlive',
|
||||||
|
'deleteitems',
|
||||||
|
'dialog',
|
||||||
|
'duplicate',
|
||||||
|
'duplicatewithchildren',
|
||||||
|
'getpagecount',
|
||||||
|
'getpagemembers',
|
||||||
|
'getversion',
|
||||||
|
'publishall',
|
||||||
|
'publishitems',
|
||||||
|
'restorepage',
|
||||||
|
'revert',
|
||||||
|
'rollback',
|
||||||
|
'sidereport',
|
||||||
|
'submit',
|
||||||
|
'switchlanguage',
|
||||||
|
'tasklist',
|
||||||
|
'unpublish',
|
||||||
|
'versions',
|
||||||
|
'waitingon',
|
||||||
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SiteTree Columns that can be filtered using the the Site Tree Search button
|
* SiteTree Columns that can be filtered using the the Site Tree Search button
|
||||||
*/
|
*/
|
||||||
@ -1324,29 +1354,6 @@ JS
|
|||||||
return $this->returnItemToUser($newrecord);
|
return $this->returnItemToUser($newrecord);
|
||||||
}
|
}
|
||||||
|
|
||||||
// HACK HACK HACK - Dont remove without telling simon ;-)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is only used by parents inc.
|
|
||||||
* TODO Work out a better way of handling control to the individual page objects.
|
|
||||||
*/
|
|
||||||
function sethottip($data,$form) {
|
|
||||||
$page = DataObject::get_by_id("SiteTree", $_REQUEST['ID']);
|
|
||||||
return $page->sethottip($data,$form);
|
|
||||||
}
|
|
||||||
/**
|
|
||||||
* This is only used by parents inc.
|
|
||||||
* TODO Work out a better way of handling control to the individual page objects.
|
|
||||||
*/
|
|
||||||
function notifyInvitation($data,$form) {
|
|
||||||
$page = DataObject::get_by_id("SiteTree", $_REQUEST['ID']);
|
|
||||||
return $page->notifyInvitation($data,$form);
|
|
||||||
}
|
|
||||||
function testInvitation($data,$form) {
|
|
||||||
$page = DataObject::get_by_id("SiteTree", $_REQUEST['ID']);
|
|
||||||
return $page->testInvitation($data,$form);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provide the permission codes used by LeftAndMain.
|
* Provide the permission codes used by LeftAndMain.
|
||||||
* Can't put it on LeftAndMain since that's an abstract base class.
|
* Can't put it on LeftAndMain since that's an abstract base class.
|
||||||
|
@ -11,6 +11,14 @@
|
|||||||
* @subpackage comments
|
* @subpackage comments
|
||||||
*/
|
*/
|
||||||
class CommentAdmin extends LeftAndMain {
|
class CommentAdmin extends LeftAndMain {
|
||||||
|
static $allowed_actions = array(
|
||||||
|
'approvedmarked',
|
||||||
|
'deleteall',
|
||||||
|
'deletemarked',
|
||||||
|
'hammarked',
|
||||||
|
'showtable',
|
||||||
|
'spammarked',
|
||||||
|
);
|
||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
parent::init();
|
parent::init();
|
||||||
|
@ -13,6 +13,14 @@
|
|||||||
* @subpackage core
|
* @subpackage core
|
||||||
*/
|
*/
|
||||||
abstract class GenericDataAdmin extends LeftAndMain {
|
abstract class GenericDataAdmin extends LeftAndMain {
|
||||||
|
static $allowed_actions = array(
|
||||||
|
'createRecord',
|
||||||
|
'delete',
|
||||||
|
'export',
|
||||||
|
'getResults',
|
||||||
|
'save',
|
||||||
|
'show',
|
||||||
|
);
|
||||||
|
|
||||||
public $filter;
|
public $filter;
|
||||||
|
|
||||||
|
@ -16,6 +16,19 @@ abstract class LeftAndMain extends Controller {
|
|||||||
static $extra_menu_items = array(), $removed_menu_items = array(), $replaced_menu_items = array();
|
static $extra_menu_items = array(), $removed_menu_items = array(), $replaced_menu_items = array();
|
||||||
static $ForceReload;
|
static $ForceReload;
|
||||||
|
|
||||||
|
static $allowed_actions = array(
|
||||||
|
'ajaxupdateparent',
|
||||||
|
'ajaxupdatesort',
|
||||||
|
'callPageMethod',
|
||||||
|
'deleteitems',
|
||||||
|
'getitem',
|
||||||
|
'getsubtree',
|
||||||
|
'myprofile',
|
||||||
|
'printable',
|
||||||
|
'save',
|
||||||
|
'show',
|
||||||
|
);
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
Director::set_site_mode('cms');
|
Director::set_site_mode('cms');
|
||||||
|
|
||||||
|
@ -15,6 +15,31 @@ class NewsletterAdmin extends LeftAndMain {
|
|||||||
|
|
||||||
static $template_path = null; // defaults to (project)/templates/email
|
static $template_path = null; // defaults to (project)/templates/email
|
||||||
|
|
||||||
|
static $allowed_actions = array(
|
||||||
|
'adddraft',
|
||||||
|
'addgroup',
|
||||||
|
'addtype',
|
||||||
|
'autocomplete',
|
||||||
|
'displayfilefield',
|
||||||
|
'getformcontent',
|
||||||
|
'getsentstatusreport',
|
||||||
|
'getsitetree',
|
||||||
|
'memberblacklisttoggle',
|
||||||
|
'newmember',
|
||||||
|
'remove',
|
||||||
|
'removebouncedmember',
|
||||||
|
'removenewsletter',
|
||||||
|
'save',
|
||||||
|
'savemember',
|
||||||
|
'savenewsletter',
|
||||||
|
'sendnewsletter',
|
||||||
|
'showdrafts',
|
||||||
|
'showmailtype',
|
||||||
|
'shownewsletter',
|
||||||
|
'showrecipients',
|
||||||
|
'showsent',
|
||||||
|
);
|
||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
// Check permissions
|
// Check permissions
|
||||||
// if(!Member::currentUser() || !Member::currentUser()->isAdmin()) Security::permissionFailure($this);
|
// if(!Member::currentUser() || !Member::currentUser()->isAdmin()) Security::permissionFailure($this);
|
||||||
|
@ -14,6 +14,17 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
static $tree_class = "Group";
|
static $tree_class = "Group";
|
||||||
static $subitem_class = "Member";
|
static $subitem_class = "Member";
|
||||||
|
|
||||||
|
static $allowed_actions = array(
|
||||||
|
'addgroup',
|
||||||
|
'addmember',
|
||||||
|
'autocomplete',
|
||||||
|
'getmember',
|
||||||
|
'listmembers',
|
||||||
|
'newmember',
|
||||||
|
'removememberfromgroup',
|
||||||
|
'savemember',
|
||||||
|
);
|
||||||
|
|
||||||
public function init() {
|
public function init() {
|
||||||
// Check permissions
|
// Check permissions
|
||||||
// if(!Member::currentUser() || !Member::currentUser()->isAdmin()) Security::permissionFailure($this);
|
// if(!Member::currentUser() || !Member::currentUser()->isAdmin()) Security::permissionFailure($this);
|
||||||
|
Loading…
Reference in New Issue
Block a user