mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
Merge remote-tracking branch 'origin/2.4' into post-2.4
Conflicts: composer.json
This commit is contained in:
commit
0d2ef15c21
@ -12,7 +12,7 @@ before_script:
|
|||||||
- cd ~/builds/ss
|
- cd ~/builds/ss
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- phpunit cms/tests
|
- vendor/bin/phpunit cms/tests
|
||||||
|
|
||||||
branches:
|
branches:
|
||||||
except:
|
except:
|
||||||
|
@ -70,6 +70,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
$fields = $record->getCMSFields();
|
$fields = $record->getCMSFields();
|
||||||
|
|
||||||
if($fields->hasTabSet()) {
|
if($fields->hasTabSet()) {
|
||||||
|
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
|
||||||
|
if(Permission::check('ADMIN')) {
|
||||||
$fields->findOrMakeTab('Root.Import',_t('Group.IMPORTTABTITLE', 'Import'));
|
$fields->findOrMakeTab('Root.Import',_t('Group.IMPORTTABTITLE', 'Import'));
|
||||||
$fields->addFieldToTab('Root.Import',
|
$fields->addFieldToTab('Root.Import',
|
||||||
new LiteralField(
|
new LiteralField(
|
||||||
@ -80,6 +82,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
if(Permission::check('APPLY_ROLES')) {
|
if(Permission::check('APPLY_ROLES')) {
|
||||||
$fields->addFieldToTab(
|
$fields->addFieldToTab(
|
||||||
'Root.Roles',
|
'Root.Roles',
|
||||||
@ -147,8 +151,19 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
new Tab('Import', _t('SecurityAdmin.TABIMPORT', 'Import'),
|
// necessary for tree node selection in LeftAndMain.EditForm.js
|
||||||
|
new HiddenField('ID', false, 0)
|
||||||
|
);
|
||||||
|
|
||||||
|
// Add import capabilities. Limit to admin since the import logic can affect assigned permissions
|
||||||
|
if(Permission::check('ADMIN')) {
|
||||||
|
$fields->addFieldsToTab(
|
||||||
|
'Root',
|
||||||
|
new Tab(
|
||||||
|
'Import',
|
||||||
|
_t('SecurityAdmin.TABIMPORT', 'Import'),
|
||||||
new LiteralField(
|
new LiteralField(
|
||||||
'GroupImportFormIframe',
|
'GroupImportFormIframe',
|
||||||
sprintf(
|
sprintf(
|
||||||
@ -157,10 +172,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
),
|
|
||||||
// necessary for tree node selection in LeftAndMain.EditForm.js
|
|
||||||
new HiddenField('ID', false, 0)
|
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
// Add roles editing interface
|
// Add roles editing interface
|
||||||
if(Permission::check('APPLY_ROLES')) {
|
if(Permission::check('APPLY_ROLES')) {
|
||||||
@ -217,6 +230,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
* @return Form
|
* @return Form
|
||||||
*/
|
*/
|
||||||
public function MemberImportForm() {
|
public function MemberImportForm() {
|
||||||
|
if(!Permission::check('ADMIN')) return false;
|
||||||
|
|
||||||
$group = $this->currentPage();
|
$group = $this->currentPage();
|
||||||
$form = new MemberImportForm(
|
$form = new MemberImportForm(
|
||||||
$this,
|
$this,
|
||||||
@ -249,6 +264,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
* @return Form
|
* @return Form
|
||||||
*/
|
*/
|
||||||
public function GroupImportForm() {
|
public function GroupImportForm() {
|
||||||
|
if(!Permission::check('ADMIN')) return false;
|
||||||
|
|
||||||
$form = new GroupImportForm(
|
$form = new GroupImportForm(
|
||||||
$this,
|
$this,
|
||||||
'GroupImportForm'
|
'GroupImportForm'
|
||||||
|
@ -24,4 +24,8 @@
|
|||||||
"branch-alias": {
|
"branch-alias": {
|
||||||
"dev-post-2.4": "2.5.x-dev"
|
"dev-post-2.4": "2.5.x-dev"
|
||||||
}
|
}
|
||||||
}}
|
},
|
||||||
|
"require-dev": {
|
||||||
|
"phpunit/PHPUnit": "~3.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user