diff --git a/docs/upgrades/upgrade_5.4.2-5.5.0.sql b/docs/upgrades/upgrade_5.4.2-5.5.0.sql index f04fb2914..256862997 100644 --- a/docs/upgrades/upgrade_5.4.2-5.5.0.sql +++ b/docs/upgrades/upgrade_5.4.2-5.5.0.sql @@ -87,9 +87,13 @@ alter table groups add column databaseLinkId int not null default 0; alter table groups add column dbCacheTimeout int not null default 3600; alter table groups add column dbQuery text; +insert into settings (name, value) values('encryptLogin', 0); +insert into international (internationalId, namespace, languageId, message, lastUpdated) values(1006, 'WebGUI', 1, 'Encrypt Login?', 1057208065); +delete from international where languageId=1 and namespace='WebGUI' and internationalId=607; +INSERT INTO international VALUES (607,'WebGUI',1,'Anonymous Registration
\r\nDo you wish visitors to your site to be able to register themselves?\r\n

\r\n\r\nRun On Registration
\r\nIf there is a command line specified here, it will be executed each time a user registers anonymously.\r\n

\r\n\r\nEnable Karma?
\r\nShould karma be enabled?\r\n

\r\n\r\nKarma Per Login
\r\nThe amount of karma a user should be given when they log in. This only takes affect if karma is enabled.\r\n

\r\n\r\nSession Timeout
\r\nThe amount of time that a user session remains active (before needing to log in again). This timeout is reset each time a user views a page. Therefore if you set the timeout for 8 hours, a user would have to log in again if s/he hadn\'t visited the site for 8 hours.\r\n

\r\n\r\nAllow users to deactivate their account?
\r\nDo you wish to provide your users with a means to deactivate their account without your intervention?\r\n

\r\n\r\nAuthentication Method (default)
\r\nWhat should the default authentication method be for new accounts that are created? The two available options are WebGUI and LDAP. WebGUI authentication means that the users will authenticate against the username and password stored in the WebGUI database. LDAP authentication means that users will authenticate against an external LDAP server.\r\n

\r\n\r\nNOTE: Authentication settings can be customized on a per user basis.\r\n\r\n\r\n\r\n

\r\nNOTE: Depending upon what authentication modules you have installed in your system you\'ll see any number of options after this point. The following are the options for the two defaultly installed authentication methods.\r\n

\r\n\r\nEncrypt Login?
\r\nShould the system use the https protocol for the login form? Note that setting this option to true will only encrypt the authentication itself, not anything else before or after the authentication.\r\n

\r\n\r\n

WebGUI Authentication Options

\r\n\r\nSend welcome message?
\r\nDo you wish WebGUI to automatically send users a welcome message when they register for your site? \r\n

\r\nNOTE: In addition to the message you specify below, the user\'s account information will be included in the message.\r\n

\r\n\r\nWelcome Message
\r\nType the message that you\'d like to be sent to users upon registration.\r\n

\r\n\r\nRecover Password Message
\r\nType a message that will be sent to your users if they try to recover their WebGUI password.\r\n

\r\n\r\n

LDAP Authentication Options

\r\n\r\nLDAP URL (default)
\r\nThe default url to your LDAP server. The LDAP URL takes the form of ldap://[server]:[port]/[base DN]. Example: ldap://ldap.mycompany.com:389/o=MyCompany.\r\n

\r\n\r\n\r\n\r\n\r\nLDAP Identity
\r\nThe LDAP Identity is the unique identifier in the LDAP server that the user will be identified against. Often this field is shortname, which takes the form of first initial + last name. Example: jdoe. Therefore if you specify the LDAP identity to be shortname then Jon Doe would enter jdoe during the registration process.\r\n

\r\n\r\nLDAP Identity Name
\r\nThe label used to describe the LDAP Identity to the user. For instance, some companies use an LDAP server for their proxy server users to authenticate against. In the documentation or training already provided to their users, the LDAP identity is known as their Web Username. So you could enter that label here for consitency.\r\n

\r\n\r\nLDAP Password Name
\r\nJust as the LDAP Identity Name is a label, so is the LDAP Password Name. Use this label as you would LDAP Identity Name.\r\n

\r\n\r\n',1044708602,NULL); + insert into international (internationalId,languageId,namespace,message,lastUpdated) values (81,1,'Survey','Anonymous responses?',1059069492); delete from international where languageId=1 and namespace='Survey' and internationalId=4; insert into international (internationalId,languageId,namespace,message,lastUpdated) values (4,1,'Survey','Surveys allow you to gather information from your users. In the case of WebGUI surveys, you can also use them to test your user\'s knowledge.\r\n

\r\n\r\nQuestion Order
\r\nThe order the questions will be asked. Sequential displays the questions in the order you create them. Random displays the questions randomly. Response driven displays the questions in order based on the responses of the users.\r\n

\r\n\r\nMode
\r\nBy default the Survey is in survey mode. This allows it to ask questions of your users. However, if you switch to Quiz mode, you can have a self-correcting test of your user\'s knowledge.\r\n

\r\n\r\nAnonymous responses?
\r\nSelect whether or not the survey will record and display information that can identify a user and their responses. If left at the default value of "No", the survey will record the user\'s IP address as well as their WebGUI User ID and Username if logged in. This info will then be available in the survey\'s reports. If set to "Yes", these three fields will contain scrambled data that can not be traced to a particular user.\r\n

\r\n\r\nWho can take the survey?
\r\nWhich users can participate in the survey?\r\n

\r\n\r\n\r\nWho can view reports?
\r\nWho can view the results of the survey?\r\n

\r\n\r\n\r\nWhat next?
\r\nIf you leave this set at its default, then you will add a question directly after adding the survey.\r\n

\r\n',1059069492); alter table Survey add column anonymous char(1) not null default 0; alter table Survey_response change userId userId varchar(11); - diff --git a/lib/WebGUI/Operation/Account.pm b/lib/WebGUI/Operation/Account.pm index b03fb86fb..f153bfe9b 100644 --- a/lib/WebGUI/Operation/Account.pm +++ b/lib/WebGUI/Operation/Account.pm @@ -272,6 +272,9 @@ sub www_displayLogin { } else { $output .= '

'.WebGUI::International::get(66).'

'; $f = WebGUI::HTMLForm->new; + if ($session{setting}{encryptLogin}) { + $f->{_header} =~ s/http:/https:/; + } $f->hidden("op","login"); $f->text("username",WebGUI::International::get(50)); $f->password("identifier",WebGUI::International::get(51)); diff --git a/lib/WebGUI/Operation/Settings.pm b/lib/WebGUI/Operation/Settings.pm index c75feafb2..f3a19be90 100644 --- a/lib/WebGUI/Operation/Settings.pm +++ b/lib/WebGUI/Operation/Settings.pm @@ -50,6 +50,7 @@ sub www_editUserSettings { $f->integer("karmaPerLogin",WebGUI::International::get(540),$session{setting}{karmaPerLogin}); $f->interval("sessionTimeout",WebGUI::International::get(142),WebGUI::DateTime::secondsToInterval($session{setting}{sessionTimeout})); $f->yesNo("selfDeactivation",WebGUI::International::get(885),$session{setting}{selfDeactivation}); + $f->yesNo("encryptLogin",WebGUI::International::get(1006),$session{setting}{encryptLogin}); foreach (@{$session{config}{authMethods}}) { $options->{$_} = $_; }