[phpldapadmin] [ phpldapadmin-Bugs-2875788 ] Editing an OU prompts to select a template
"SourceForge.net" <[email protected]> Sat, 17 Apr 2010 19:19:24 +0000
| Newsgroups | gmane.comp.ldap.davedap |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #2875788, was opened at 2009-10-09 17:45 Message generated for change (Comment added) made by towerlexa You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=498546&aid=2875788&group_id=61828 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: 1.2.x Status: Closed Resolution: Rejected Priority: 5 Private: No Submitted By: Joshua Kinard (kumba) Assigned to: Nobody/Anonymous (nobody) Summary: Editing an OU prompts to select a template Initial Comment: I think this is a bug, but the behavior described below of PLA 1.2.0.4 could be intentional. Attached to this are several LDIF Files to re-create a basic ldap tree named ACME (using X.500 notation), as well as a few images from my working setup, What I am running into is that under PLA 1.2.0.4, if I have o=acme, and three sub ou's, ou=users, ou=groups, ou=posixgroups, and I attempt to click on any of them to add children entries, PLA will prompt me to select a template to edit the OU with. PLA 1.1.0.7 used to automatically determine the Template (or it used no template at all). By allowing one to choose a template, PLA 1.2.0.4 is opening the door for erroneous user behavior by allowing users to pick the wrong template, and then editing attributes of the selected object and potentially damaging their tree by having the object converted to the object described in the template chosen. If this behavior is intentional, then I think what PLA 1.2.0.4 (or later) needs to do is only display templates that match the primary objectClass of the object being edited, otherwise it should fallback to PLA 1.1.0.7's default behavior of "No Template" and let you edit the attributes directly per the defined objectClasses and the LDAP schema. ---------------------------------------------------------------------- Comment By: towerlexa (towerlexa) Date: 2010-04-17 21:19 Message: I'm sorry, but i would like to tell you, that i have this bug here in my phpldapadmin version 1.2.0.5. I came originally from version 1.1.0.7, and after deploying phpldapadmin version 1.2.0.5, i'm always asked to change the template... In other word, after every new login phpldapadmin prompt me to select a template for editing the entry Here: http://www.ubuntu-forum.de/post/297441/phpldapadmin-problem-mit-vorlagen-und-einrichtun.html you could find some picture, which shows the behavior. It would be nice to explain me, why phpldapadmin don't remember the template, after selecting the "Switch Template" menĂ¼ entry. thanks in advance Kindest regards ---------------------------------------------------------------------- Comment By: Deon George (wurley) Date: 2009-12-12 08:06 Message: Joshua, Most of the major changes between 1.1 and 1.2 were documented as they were changed on the wiki - here is the direct URL: http://phpldapadmin.sourceforge.net/wiki/index.php/Roadmap As for "more clearer" documentation, feel free to update the wiki to make it clearer, if you think others will benefit. Thats the great thing about wikis ;) I know it could be better than what it is today - but you can only do so much with two arms and legs ... ---------------------------------------------------------------------- Comment By: Joshua Kinard (kumba) Date: 2009-12-12 07:51 Message: I think here, we're all correct, more or less. wurley's right, you can get the same effect in 1.2 as one did in 1.1. The problem is that it takes a lot more editing of the templates in 1.2 to get this effect than what one had to do in 1.1. I estimate it took me maybe 2-3hrs tops to get 1.1 working how I wanted it. I spent one-and-a-half days (~12hrs, because 1day = 8hr work day) re-factoring the few templates I crafted and adjusting for code changes from my 1.1 templates. What would have been nice, I suppose, is more clear documentation on what made 1.2 so different from 1.1 and why the difference is better -- especially the syntax changes, like how to invoke functions and changing from semi-colons to commas (I think, or was it vice-versa?) in those functions within the templates. That would have, cumulatively, probably saved me at least 2hrs out of the 12. But, it is what it is. You live and learn from it all. ---------------------------------------------------------------------- Comment By: Chris Picton (cpicton) Date: 2009-12-09 14:28 Message: Thanks for the clarification, however, I see the following behaviour change from the older version: 1.1.0.5 1.1.0.5 If only a single template matched (apart from default), use that matching template If no template match, use default If more than one template match, display only matching templates, not default 1.2.0.4 (disable_default_template = false) If only a single template matched (apart from default), display choice of template or default If no templates match, display choice of only default, If more than one template match, display matching templates, including default 1.2.0.4 (disable_default_template = true) If only a single template matched (apart from default), use template If no templates match, node cannot be edited If more than one template match, display matching templates The older behaviour seems more intuitive to me. ---------------------------------------------------------------------- Comment By: Deon George (wurley) Date: 2009-12-09 13:58 Message: The "default" template is an AVAILABLE template. So in your case, you have 2 AVAILABLE templates, and you are asked which one to use. ---------------------------------------------------------------------- Comment By: Chris Picton (cpicton) Date: 2009-12-09 13:57 Message: In my case, only one template matches, but I still get prompted to select a template, either 'Sudo Policy' or default ---------------------------------------------------------------------- Comment By: Deon George (wurley) Date: 2009-12-09 13:17 Message: OK, a further point of clarification. The "regexp" parameter in a template, determine if the template is AVAILABLE for a container. IE: If the container matches the regexp, the template is AVAILABLE to be be used. If the container does not match the regexp, the template is DISABLED for the container. So, if there is only 1 AVAILABLE template, it is selected automatically. If there are more than 1 AVAILABLE templates, you'll be asked "which one do you want to use". If this is not the behaviour you are seeing, then repen this bug. You can simulate this behaviour many ways - the easiest - is to set appearance,custom_templates_only and appearance,disable_default_template and make sure your templates are named custom_x. Then your only two defined templates will be evaluated when editing an entry and the regexp condition will determine if/when they can be used. ---------------------------------------------------------------------- Comment By: Chris Picton (cpicton) Date: 2009-12-09 11:15 Message: I have to agree with Joshua here. I have been running 1.1.0.5, and I had created two custom templates (in my modification/ directory, I have only ecnuser.xml and sudoPolicy.xml) When I select a sudo policy in my tree, the regexp in sudoPolicy.xml matches (<regexp>^cn=.*,ou=Sudoers,o=.*</regexp>), and It automatically uses the correct editing template, I don't have to choose. Same with ecnuser. The regexp I have defined in the xml matches the DN on the users in ldap, and the correct template is chosen automatically. With 1.2.0.4, it always asks me which template to use. I am looking for a behaviour where, for specific paths in my ldap tree, specific templates are always used to edit those nodes (as it was in 1.1.0.5) Your comments would be appreciated. ---------------------------------------------------------------------- Comment By: Deon George (wurley) Date: 2009-10-10 06:34 Message: Joshua, I dont see what your bug is (ie: what you are describing is not how PLA works) - so few points of clarification: * PLA 1.1.0.7 did not automatically determine the editing template - the only supplied EDITING template was disabled by default, and thus edits used to, by default, use the default template. * When you edit an entry, you can govern which template should be used to edit that entry, including the default. If you edit an object with an objectClass=account with a template that was configured for example "posix groups", then PLA will attempt to change the entry when you submit to a posix group entry. (If is likely to fail, if you are changing structural objectclasses as a result).) If you have "submit confirmation" configured, you can optionally "skip" the objectClass modificaitons and the resulting must attributes, if you dont want the change to go ahead (or you can cancel). * If you want to control that a template can only be uesd to edit specific entries, you can control that with a regexp in the template definition. For example, only allow the OU template to be used to edit entries that start with ou= * When creating a child entry (from an entry that was rendered with the default template, or a selected template), PLA will ask you what template you want to use when creating the child. This does not modify the parent entry. So, it is perfectly normal to have an "OU" template to define what attributes an "OU" object should have (and use that to edit the OU entry), and it is perfectly normal for an OU parent to create entries that are for example, not OU. A last point of clarification, the templates provided are "SAMPLES" - that work for me and are quite generic. You can disable the use of the supplied templates, and/or enforce the usage of just your own. ---------------------------------------------------------------------- Comment By: Joshua Kinard (kumba) Date: 2009-10-09 18:01 Message: Also: phpLDAPAdmin Version: Affected: 1.2.0.4; Not Affected: 1.1.0.7 LDAP Server: OpenLDAP 2.4.11-1 from Debian Lenny 5.0 HTTP Server: Lighttpd 1.4.19-5 from Debian Lenny 5.0 PHP Version: php5-cgi-5.2.5.dfsg from Debian Lenny 5.0 OS: Debian Lenny 5.0 (Kernel: 2.6.26-2-xen-amd64) ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=498546&aid=2875788&group_id=61828 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev ______________________________________ phpLDAPadmin development mailing list. To unsbuscribe: https://lists.sourceforge.net/lists/listinfo/phpldapadmin-devel http://phpldapadmin.sourceforge.net/