This patch touches on a few different areas and gets a bit meta. Hopefully it also lays a clearer path for additional patches around controlling the addition/exclusion of the JS on the site.

  • Implements an admin permission specific to sumome (and uses that permission to control access to the configuration screen).
  • Adds a link to the configuration screen to the .info file (so it will be accessible directly from the Modules admin screen).
  • Moved the application of the JS from hook_init() to hook_page_build() (per note from here: https://twitter.com/davereid/status/294554866649542657).
  • Changed the code injected via drupal_add_html_head() to avoid the weird self-closing SCRIPT tag that needed a suffix for proper closure.
CommentFileSizeAuthor
sumome-permissions-js-info.patch2.85 KBmraichelson

Comments

mraichelson created an issue. See original summary.

carsonblack’s picture

Patch applies cleanly and appears to provide the desired functionality. Thanks mraichelson! Sorry it took so long to get around to it.

carsonblack’s picture

Status: Needs review » Reviewed & tested by the community
carsonblack’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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