银条网格字段条目对普通后端用户不可见


SilverStripe gridField Entries not visible for normal backend user

我有两个用户组管理员Inhaltsautoren

我的登陆页面有一个带有网格字段的选项卡预告片。普通用户看不到条目,我不知道为什么?

我找不到用于设置Inhaltsautoren权限的内容。有人知道为什么网格字段中没有条目吗?

预告片.php

<?php 
class Teaser extends DataObject {
private static $db = array (
    'Title' => 'Varchar',
    'Description' => 'HTMLText'
);
private static $has_one = array (
    'Photo' => 'Image',
    'Link' => 'Link'
);
private static $many_many = array(
    'Tags' => 'Tag'
);
private static $summary_fields = array (
    'GridThumbnail' => '',
    'Title' => 'Titel',
    'Description' => 'Beschreibung'
);
public function getGridThumbnail() {
    if($this->Photo()->exists()) {
        return $this->Photo()->SetWidth(100);
    }
    return "(no image)";
}
public function getCMSFields() {
    $fields = FieldList::create(
        TextField::create('Title'),
        $tags = TagField::create('Tags','Tags',Tag::get(),$this->Tags()),
        HTMLEditorField::create('Description', 'Beschreibung'),
        LinkField::create('LinkID', 'Weiterleitung'),
        $uploader = UploadField::create('Photo')
    );
    $tags->setShouldLazyLoad(true); // tags should be lazy loaded
    $tags->setCanCreate(true);      // new tag DataObjects can be created
    $uploader->setFolderName('teaser');
    $uploader->getValidator()->setAllowedExtensions(array('png','jpeg','jpg'));
    return $fields;
}
}

和我的拉丁页面.php

$fields->addFieldToTab('Root.Teaser', $gridField = GridField::create(
    'Teasers',
    'Landing Page Teaser',
    $this->Teasers(),
    GridFieldConfig_RecordEditor::create()
));

$gridField->getConfig()->getComponentByType("GridFieldDataColumns")->setFieldCasting(array("Description"=>"HTMLText->BigSummary"));

在数据对象上使用canView(),并在此函数中检查是否允许用户查看此对象。

  public function canView($member = null) {
    return Permission::check('ADMIN', 'any');
  }