we should either:

  1. hide project release on node/add
  2. put a description on the the node add page and dead end the link to an actual page.
CommentFileSizeAuthor
#4 project_release_node_add_form.patch4.39 KBhunmonk

Comments

dww’s picture

i tried *very* hard for #1, and various drupal menu limitations, hook_access() behavior, and other woes made it impossible to get it right. :(

#2 is fairly reasonable in the short term.

but #3 would be even better: add another page to the N-page form. if you don't know the project, present page #0 to just select that. if you already know the project, skip to page #1 for the "start" of the release add wizard. very similar to creating a new issue.

/me waits for FAPI multi-step stuff to get more functional. ;)

hunmonk’s picture

Status: Active » Postponed

looks like #2 was implemented. postponing until we have a menu system that allows a more elegant solution.

dww’s picture

Version: x.y.z » 5.x-1.x-dev
Priority: Minor » Normal
Status: Postponed » Active

As I wrote in (duplicate) http://drupal.org/node/199182 :

"Inspired and emboldened by what I learned over at http://drupal.org/node/199138 removing the evil multipage form for project_issues, we should do the same thing for release nodes.

Instead of converting the release node form into a true multipage form, all we need to do is stick a simple form directly at node/add/project-release with a project selector (restricted to the projects the current user has permission to create release nodes for), and then redirect to the full URL."

hunmonk’s picture

Status: Active » Needs review
StatusFileSize
new4.39 KB

attached patch does it, i think. tested and seems to work perfectly. i'm *pretty* sure the menu access checks are right, but please check them for me :)

aclight’s picture

Status: Needs review » Reviewed & tested by the community

The code looks good to me and the functionality works well. I checked this using test users with different permissions and only got redirected to the add a release page when I had the appropriate permissions.

hunmonk’s picture

Status: Reviewed & tested by the community » Active

committed to 5.x-1.x. setting back to active until this is deployed on d.o et. all.

dww’s picture

Status: Active » Needs work

XSS on content type name:

+      'title' => t('Submit !name', array('!name' => $types['project_release']->name)),

Not *really* a big deal, but it's potential priv escalation and we don't do that. ;) You want '@' not '!' to be safe.

dww’s picture

Status: Needs work » Active

Committed to HEAD for 5.x-1.x.

hunmonk’s picture

Status: Active » Fixed

fixed, deployed on d.o

Anonymous’s picture

Status: Fixed » Closed (fixed)

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