Hi there,
Within my template I have a TableField that is only displaying the Delete icon when the user has Full Administrative rights.
Does anyone know why my contend editors can't delete data in the TableField?
Here's the section of code:
function getCMSFields() {
$fields = parent::getCMSFields();
//Program Rank Fields
$Top10ProgramsTable = new TableField('Top10ProgramsField', 'ProgramRank',array('Rank'=>'Rank','Program'=>'Program', 'Channel'=>'Channel', 'Audience'=>'Audience'), array('Rank'=>'TextField', 'Program'=>'TextField', 'Channel'=>'TextField', 'Audience'=>'TextField'), "MyNewsletterID",$this->ID);
$Top10ProgramsTable->setExtraData(array('MyNewsletterID' => $this->ID ? $this->ID : '$RecordID'));
$Top10ProgramsTable->setPermissions(array('edit', 'add', 'delete')); //adding and removing this line doesn't affect the outcome
return $fields;
}
static $has_many = array(
'Top10Programs' => 'ProgramRank');
class ProgramRank extends DataObject {
static $db = array(
'Rank' => 'Text',
'Program' => 'Text',
'Channel' => 'Text',
'Audience' => 'Text'
);
static $has_one = array(
'MyNewsletter' => 'TwoColumnNewsletter'
);
}
Thank you