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
|
||||
|
||||
script:
|
||||
- phpunit cms/tests
|
||||
- vendor/bin/phpunit cms/tests
|
||||
|
||||
branches:
|
||||
except:
|
||||
|
@ -70,6 +70,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
$fields = $record->getCMSFields();
|
||||
|
||||
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->addFieldToTab('Root.Import',
|
||||
new LiteralField(
|
||||
@ -80,6 +82,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if(Permission::check('APPLY_ROLES')) {
|
||||
$fields->addFieldToTab(
|
||||
'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(
|
||||
'GroupImportFormIframe',
|
||||
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
|
||||
if(Permission::check('APPLY_ROLES')) {
|
||||
@ -217,6 +230,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
* @return Form
|
||||
*/
|
||||
public function MemberImportForm() {
|
||||
if(!Permission::check('ADMIN')) return false;
|
||||
|
||||
$group = $this->currentPage();
|
||||
$form = new MemberImportForm(
|
||||
$this,
|
||||
@ -249,6 +264,8 @@ class SecurityAdmin extends LeftAndMain implements PermissionProvider {
|
||||
* @return Form
|
||||
*/
|
||||
public function GroupImportForm() {
|
||||
if(!Permission::check('ADMIN')) return false;
|
||||
|
||||
$form = new GroupImportForm(
|
||||
$this,
|
||||
'GroupImportForm'
|
||||
|
@ -24,4 +24,8 @@
|
||||
"branch-alias": {
|
||||
"dev-post-2.4": "2.5.x-dev"
|
||||
}
|
||||
}}
|
||||
},
|
||||
"require-dev": {
|
||||
"phpunit/PHPUnit": "~3.7"
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user