From: <gem...@li...> - 2011-11-29 11:38:32
|
Revision: 313 http://gemstracker.svn.sourceforge.net/gemstracker/?rev=313&view=rev Author: matijsdejong Date: 2011-11-29 11:38:22 +0000 (Tue, 29 Nov 2011) Log Message: ----------- Fixes for MGZ tracker isses 461, 457 en een begin voor 456 Modified Paths: -------------- branches/1.5.0-pulse/library/classes/Gems/Default/StaffAction.php branches/1.5.0-pulse/library/classes/GemsEscort.php branches/1.5.0-pulse/library/configs/db/patches.sql branches/1.5.0-pulse/library/configs/db/tables/gems__organizations.20.sql Modified: branches/1.5.0-pulse/library/classes/Gems/Default/StaffAction.php =================================================================== --- branches/1.5.0-pulse/library/classes/Gems/Default/StaffAction.php 2011-11-29 11:15:11 UTC (rev 312) +++ branches/1.5.0-pulse/library/classes/Gems/Default/StaffAction.php 2011-11-29 11:38:22 UTC (rev 313) @@ -166,6 +166,7 @@ $bridge->addText( 'gsf_email', array('size' => 30))->addValidator('SimpleEmail')->addValidator($model->createUniqueValidator('gsf_email')); $bridge->addSelect('gsf_id_primary_group'); + $bridge->addCheckbox('gul_can_login', 'description', $this->_('Users can only login when this box is checked.')); $bridge->addCheckbox('gsf_logout_on_survey', 'description', $this->_('If checked the user will logoff when answering a survey.')); $bridge->addSelect('gsf_iso_lang'); @@ -222,10 +223,11 @@ if ($detailed) { $model->set('gul_user_class', 'default', $this->defaultStaffDefinition); $model->set('gsf_iso_lang', 'label', $this->_('Language'), 'multiOptions', $this->util->getLocalized()->getLanguages()); + $model->set('gul_can_login', 'label', $this->_('Can login'), 'multiOptions', $this->util->getTranslated()->getYesNo()); $model->set('gsf_logout_on_survey', 'label', $this->_('Logout on survey'), 'multiOptions', $this->util->getTranslated()->getYesNo()); } - $model->setDeleteValues('gsf_active', 0); + $model->setDeleteValues('gsf_active', 0, 'gul_can_login', 0); return $model; } Modified: branches/1.5.0-pulse/library/classes/GemsEscort.php =================================================================== --- branches/1.5.0-pulse/library/classes/GemsEscort.php 2011-11-29 11:15:11 UTC (rev 312) +++ branches/1.5.0-pulse/library/classes/GemsEscort.php 2011-11-29 11:38:22 UTC (rev 313) @@ -797,7 +797,7 @@ protected function _layoutOrganizationSwitcher() // Gems_Project_Organization_MultiOrganizationInterface { $user = $this->getLoader()->getCurrentUser(); - if ($orgs = $user->getAllowedOrganizations()) { + if ($user->isActive() && ($orgs = $user->getAllowedOrganizations())) { // Organization switcher $orgSwitch = MUtil_Html::create('div', array('id' => 'organizations')); $currentId = $user->getCurrentOrganizationId(); Modified: branches/1.5.0-pulse/library/configs/db/patches.sql =================================================================== --- branches/1.5.0-pulse/library/configs/db/patches.sql 2011-11-29 11:15:11 UTC (rev 312) +++ branches/1.5.0-pulse/library/configs/db/patches.sql 2011-11-29 11:38:22 UTC (rev 313) @@ -331,6 +331,8 @@ UPDATE `gems__organizations` SET gor_has_login = COALESCE((SELECT 1 FROM gems__staff WHERE gsf_id_organization = gor_id_organization GROUP BY gsf_id_organization), 0); +ALTER TABLE `gems__organizations` CHANGE `gor_has_respondents` `gor_has_respondents` TINYINT( 1 ) NOT NULL DEFAULT '0'; + -- PATCH: Log failed logins INSERT INTO `gems__log_actions` (`glac_id_action`, `glac_name`, `glac_change`, `glac_log`, `glac_created`) VALUES (NULL , 'loginFail', '0', '1', CURRENT_TIMESTAMP); Modified: branches/1.5.0-pulse/library/configs/db/tables/gems__organizations.20.sql =================================================================== --- branches/1.5.0-pulse/library/configs/db/tables/gems__organizations.20.sql 2011-11-29 11:15:11 UTC (rev 312) +++ branches/1.5.0-pulse/library/configs/db/tables/gems__organizations.20.sql 2011-11-29 11:38:22 UTC (rev 313) @@ -21,7 +21,7 @@ not null default 'en' references gems__languages (gml_iso_lang), gor_has_login boolean not null default 1, - gor_has_respondents boolean not null default 1, + gor_has_respondents boolean not null default 0, gor_add_respondents boolean not null default 1, gor_respondent_group bigint unsigned references gems__groups (ggp_id_group) null, gor_active boolean not null default 1, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |