mirror of
https://github.com/silverstripe/silverstripe-cms
synced 2024-10-22 08:05:56 +02:00
API CHANGE: If you can't create a given dataobject type, then don't show an import form in modeladmin
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@84521 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
15d75ad293
commit
9fbce63fa9
@ -425,6 +425,8 @@ class ModelAdmin_CollectionController extends Controller {
|
||||
$importers = $this->parentController->getModelImporters();
|
||||
if(!$importers || !isset($importers[$modelName])) return false;
|
||||
|
||||
if(!singleton($modelName)->canCreate(Member::currentUser())) return false;
|
||||
|
||||
$fields = new FieldSet(
|
||||
new HiddenField('ClassName', _t('ModelAdmin.CLASSTYPE'), $modelName),
|
||||
new FileField('_CsvFile', false)
|
||||
|
Loading…
Reference in New Issue
Block a user