mirror of https://github.com/BOINC/boinc.git
rpc: Modified create_account RPC.
RPC checks the version of BOINC client and if the client is newer than 6.10.0, then assume the user has seen the terms-of-use dialog, and thus consented to the TOU.
This commit is contained in:
parent
41b8064b32
commit
a8e1862e6f
|
@ -21,6 +21,7 @@
|
|||
include_once("../inc/boinc_db.inc");
|
||||
include_once("../inc/util.inc");
|
||||
|
||||
define('MIN_BOINCCLIENT_VERSION_TOU', 61000);
|
||||
define('CONSENT_TYPE_ENROLL','ENROLL');
|
||||
|
||||
function consent_to_a_policy($user, $consent_type_id, $consent_flag, $consent_not_required, $source, $ctime = 0) {
|
||||
|
|
|
@ -100,7 +100,7 @@ if ($user) {
|
|||
if ($checkct) {
|
||||
// As of Sept 2018, this code allows 'legacy' boinc clients to
|
||||
// create accounts. If consent_flag is null, e.g., if an older
|
||||
// BOINC client creates an account withouth this new
|
||||
// BOINC client creates an account without this new
|
||||
// parameter, the account is created as normal and there is no
|
||||
// updateto the consent table.
|
||||
//
|
||||
|
@ -111,6 +111,14 @@ if ($user) {
|
|||
// is_null($consent_flag) returns TRUE, then return an
|
||||
// xml_error(-1, ...).
|
||||
|
||||
// If BOINC client version is larger than the minimum defined,
|
||||
// then assume consent has been given, because the user must
|
||||
// have clicked through the terms-of-use dialog box.
|
||||
$client_version = boinc_client_version();
|
||||
if ($client_version >= MIN_BOINCCLIENT_VERSION_TOU) {
|
||||
$consent_flag=1;
|
||||
$source='BoincClient';
|
||||
}
|
||||
if ( (!is_null($consent_flag)) and $source) {
|
||||
// Record the user giving consent in database - if consent_flag is 0,
|
||||
// this is an 'anonymous account' and consent_not_required is
|
||||
|
|
Loading…
Reference in New Issue