Would love the ability to hide the excerpt field for certain roles under "access control". For example we want a article submit to be as simple as possible but we'd like editors to be the only ones to add "excerpts/teasers"

thanks
[p]

CommentFileSizeAuthor
#2 excerpt.patch2.66 KBaaron1234nz

Comments

Ela’s picture

That function would be great. Any news on that for 6.x?

aaron1234nz’s picture

Version: 5.x-1.3 » 6.x-1.x-dev
Status: Active » Needs review
StatusFileSize
new2.66 KB

Attached is a patch that:
1. Adds a new permission "manually edit excerpt"
2. Alters the description that appears on the content type edit page pointing out that the permissions needs to be set
3. Adds an install update which also points out that there is a new permission.

1kenthomas’s picture

Any movement on this? //subscribing

Ela’s picture

The line in the patch:

+  else if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id && variable_get('excerpt_'. $form['type']['#value'], 1) == 1 && user_access('manually enter excerpt')) {

Should be changed to:

+  if (isset($form['type']) && $form['type']['#value'] .'_node_form' == $form_id && variable_get('excerpt_'. $form['type']['#value'], 1) == 1 && user_access('manually enter excerpt')) {

Otherwise there is an error on the site.
Problem that I have is that if we apply the patch then the person who is not allowed to edit the teaser can see the teaser while editing the form, in the body section... Would be great if the whole teaser be hidden when editing..