The way domain_admin_form_alter() replaces $form['options'] makes it impossible to edit the publishing options.

With "access published checkbox on domain" you can access the "Published" checkbox but "Promoted to front page" and "Sticky at top of lists" are always hidden and set to 0.

I need normal users to create content with the default setting taken from the content-type settings.

Solution (for me)
Permission:
1) access published checkbox on domain
2) access promote checkbox on domain
3) access sticky checkbox on domain
If an option (as checkbox) is not available the content-type default setting should be used.

I could have a go at this, but I'm not sure what you are planing for domain_admin_nodeapi()

Comments

nirbhasa’s picture

I would be very grateful if you did submit a patch, Im quite tied down right now. I cleaned up the nodeapi, so now it should be straightforward to extend the behaviour for both sticky and promote in domain_admin_nodeapi and domain_admin_formalter

Note that the published checkbox has the behaviour you are looking for, it passes the default values if the user doesnt have the permissions

brt’s picture

Status: Active » Needs review
StatusFileSize
new4.2 KB

I've created a patch. Only bit of your domain_admin_nodeapi() code I don't get is where $default->status is set. Do we need it for a specific reason?

brt’s picture

StatusFileSize
new4.27 KB

I forgot to say the patch is against cvs HEAD.
I also cleaned up the formating of my code.

nirbhasa’s picture

Status: Needs review » Fixed

Committed, with minor cleanups. Thanks!

Im not sure why the $default->status was there (I wrote it a while ago) - lets leave it out for now and see how we get on.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.