From: <gem...@li...> - 2012-01-25 14:33:53
|
Revision: 422 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=422&view=rev Author: mennodekker Date: 2012-01-25 14:33:44 +0000 (Wed, 25 Jan 2012) Log Message: ----------- Fix to prevent change of userclass while editing of users with a UserDefinition that is not yet or no longer supported like the OldStaffUSerDefinition Modified Paths: -------------- trunk/library/classes/Gems/Default/StaffAction.php Modified: trunk/library/classes/Gems/Default/StaffAction.php =================================================================== --- trunk/library/classes/Gems/Default/StaffAction.php 2012-01-24 15:02:13 UTC (rev 421) +++ trunk/library/classes/Gems/Default/StaffAction.php 2012-01-25 14:33:44 UTC (rev 422) @@ -129,6 +129,14 @@ //@@TODO: Think of a better way to allow multiple methods per organization if ($this->escort->hasPrivilege('pr.staff.edit.all')) { $model->set('gul_user_class', 'label', $this->_('User Definition')); + + //Make sure old or experimental userdefinitions don't have to be changed to something that is + //allowed at the moment. For example the oldStaffUser can stay when editing a user. + $options = $model->get('gul_user_class', 'multiOptions'); + if (!array_key_exists($data['gul_user_class'], $options)) { + $options[$data['gul_user_class']] = $this->_('Unsupported UserDefinition'); + $model->set('gul_user_class', 'multiOptions', $options); + } $bridge->add('gul_user_class'); } else { $bridge->addHidden('gul_user_class'); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |