In attach small patch, which integrates Hierarchical Select and Term permissions.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | hs_taxonomy.module.patch | 1023 bytes | iv |
| hs_taxonomy.patch | 976 bytes | Romka |
In attach small patch, which integrates Hierarchical Select and Term permissions.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | hs_taxonomy.module.patch | 1023 bytes | iv |
| hs_taxonomy.patch | 976 bytes | Romka |
Comments
Comment #1
wim leersI'd like to see benchmarks first. I think this is going to affect performance a lot.
Comment #2
wim leersComment #3
wim leersClosing due to lack of response. Feel free to reopen.
Comment #4
iv commentedNo performance impact without Term Permissions active, and needed for Term Permissions to work, if enabled.
However, the patch as provided only appears to enforce permissions on the top-level terms of each Vocabulary - if a top-level term is allowed, then all children of that term are also.
Comment #5
wim leersFeel free to reroll the patch! :)
Comment #6
iv commentedFair enough :)
... Done!
No impact without Term Permissions installed (one call to function_exists('term_permissions_allowed') for each entry into hs_taxonomy_hierarchical_select_root_level() and hs_taxonomy_hierarchical_select_children().
With Term Permissions installed, equivalent to its performance with the vanilla handler (one call to term_permissions_allowed() per term).
Term Permissions special-cases a few things that this patch does not - a vocabulary that ends up empty (due to not having permissions to ANY terms in it) is removed from the form completely, and if a "required" vocabulary ends up in that state, an error is generated, and the form is terminated.
I may add those tomorrow, time permitting.
Comment #7
wim leersThanks!
Patch committed, along with an additional check in the "valid item hook". Feel free to contribute patches that improve this further.
http://drupal.org/user/99777