You can create a simple setup module to create the necessary simplify permissions when you are setting up the site.
setup/_config.php:
<?php
Director::addRules(100, array(
'admin/setup/$Action/$ID' => 'SetupCMS',
));
setup/code/SetupCMS.php:
<?php
class SetupCMS extends Controller {
static $url_segment = 'simplify';
static $allowed_actions = array(
'simplify'
);
function simplify() {
if (!Member::currentUser()->isAdmin()) {
return Security::permissionFailure($this);
}
// GroupID => Code
$general_permissions = array(
1 => array(
"SIMPLIFY_HIDE_HELP",
"SIMPLIFY_HIDE_VERSION",
"SIMPLIFY_HIDE_NON_EDIT_PAGES",
"SIMPLIFY_HIDE_CREATE",
"SIMPLIFY_HIDE_SEARCH",
"SIMPLIFY_HIDE_BATCH_ACTIONS",
"SIMPLIFY_SHOW_CREATE_OPEN",
"SIMPLIFY_HIDE_TREE_OPTIONS",
"SIMPLIFY_DRAGGABLE_ON",
"SIMPLIFY_HIDE_DRAGGABLE",
),
);
// GroupID => array(HidePage, HideName, HideType)
$page_permissions = array(
1 => array(
array('Page', 'Behaviour', 'Tab'),
array('Page', 'Access', 'Tab'),
array('BlogEntry', 'Behaviour', 'Tab'),
array('BlogEntry', 'Access', 'Tab'),
),
);
foreach ($general_permissions as $groupID => $codes) {
foreach ($codes as $code) {
$perm = DataObject::get_one("Permission", "Code='{$code}' AND GroupID={$groupID}");
if (!$perm) {
Permission::grant($groupID, $code);
}
}
}
foreach ($page_permissions as $groupID => $permissions) {
foreach ($permissions as $permission) {
$perm = SimplifyPermission::checkField($permission[0], $permission[1], $permission[2], $groupID);
if (!$perm) {
$perm = new SimplifyPermission;
$perm->HidePage = $permission[0];
$perm->HideName = $permission[1];
$perm->HideType = $permission[2];
$perm->GroupID = $groupID;
$perm->write();
}
}
}
echo "Simplify settings updated. Simplify rocks!";
}
}
After that, just access the url /admin/setup/simplify
For a list of simplify permission in the $general_permissions array, you can refer to simplify/code/SimplifyPermissionProvider.php
For a list of simplify permission in the $page_permissions array, you will need to refer to the "Field Tree" after you click on the "Load Field Tree" button in the Simplify interface.