keystonejs / keystone-classic

Node.js CMS and web app framework
http://v4.keystonejs.com
MIT License
14.63k stars 2.2k forks source link

Inherited noedit List is editable #3154

Open thehult opened 8 years ago

thehult commented 8 years ago

Hi! I am creating a website which will support two types of events: regular events, which will be added by an admin and imported events, which will be automatically imported into the database by a script.

Steps to reproduce the behavior

var Event = new keystone.List('Event', {
    autokey: { path: 'path', from: 'name', unique: true},
    defaultSort: '-eventDate'
});
Event.add({
    name: { type: Types.Text, required: true, index: true },
        eventText: { type: Types.Html, wysiwyg: true},
});
Event.register();

var ImportedEvent = new keystone.List('ImportedEvent', {
    inherits: Event,
    noedit: true
});
ImportedEvent.register();

Expected behavior

Under 'Events' in the adminUI, all events are showing, but the imported events are not editable. Under 'Imported Events' in the adminUI, only the imported events are showing, an they are not editable.

Actual behavior

Under 'Events' in the adminUI, all events are showing and are editable. Under 'Imported Events' in the adminUI, only the imported events are showing, and they are NOT editable.

Am I just assuming the wrong expected behavior?

wmertens commented 8 years ago

All this code is being reworked in 0.4, so it might be fixed. Could you check if this is still happening in git master?