Closed (fixed)
Project:
Project
Version:
6.x-1.x-dev
Component:
Projects
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
20 Dec 2010 at 20:13 UTC
Updated:
3 Jan 2014 at 02:41 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
mikey_p commentedtagging
Comment #2
mikey_p commentedHere's a first attempt at this for project itself, and project_release module.
Comment #3
mikey_p commentedHere's a first attempt at this for project itself, and project_release module.
Comment #4
mikey_p commentedsettings to needs review.
Comment #5
mikey_p commentedGuess the patch failed to attach.
Comment #6
dwwYeah, this makes sense, and I agree this is a worthy addition to the API. However, it's unfortunate we have to call this from places that don't even have a real project $node yet. Not sure there's much we can do about that. Anyway, reviewing and testing, here's what I've found:
A) The project_release_project_permission_info() hunk should either use
$project = NULLas the arg or not exist at all. I think PHP does something sane if you invoke a function with more arguments than its expecting, but I'm not sure. Might be cleaner to add it (but it should default to NULL).B) If we're going to change project_release like this, we should probably have a patch for project_issue.
C) This is missing a patch against project.api.php (for both hook_project_permission_info() and _alter()).
D) The caching in project_permission_load() is all fubar now. If the results of the info() and alter() hook can vary per project, we need to use the project nid as the cache id for our static cache. Basically, we need an array of cached info arrays indexed by nid.
Comment #7
mikey_p commentedThanks, I was planning on rolling the hunk for project_release later, this was just enough to get some feedback. You're definitely right that it doesn't complain about extra args, only missing ones.
A) Fixed this
B) Opened #1005736: Update hook_project_permission_info() to accept project agrument
C) Fixed
D) Fixed
I also ran tests, and they all passed, and ran through the patch at #781344: Extend project maintainer UI for manipulating git project ACLs manually.
Comment #8
dwwYup, perfect. Ship it!
Comment #9
mikey_p commentedCommitted.