mirror of https://github.com/BOINC/boinc.git
rpc: Removed min_version_number code block.
This commit is contained in:
parent
759cc3f4a8
commit
54958022bb
|
@ -21,7 +21,6 @@
|
||||||
include_once("../inc/boinc_db.inc");
|
include_once("../inc/boinc_db.inc");
|
||||||
include_once("../inc/util.inc");
|
include_once("../inc/util.inc");
|
||||||
|
|
||||||
define('MIN_BOINCCLIENT_VERSION_TOU', 61000);
|
|
||||||
define('CONSENT_TYPE_ENROLL','ENROLL');
|
define('CONSENT_TYPE_ENROLL','ENROLL');
|
||||||
|
|
||||||
function consent_to_a_policy($user, $consent_type_id, $consent_flag, $consent_not_required, $source, $ctime = 0) {
|
function consent_to_a_policy($user, $consent_type_id, $consent_flag, $consent_not_required, $source, $ctime = 0) {
|
||||||
|
|
|
@ -99,15 +99,20 @@ if ($user) {
|
||||||
list($checkct, $ctid) = check_consent_type(CONSENT_TYPE_ENROLL);
|
list($checkct, $ctid) = check_consent_type(CONSENT_TYPE_ENROLL);
|
||||||
if ($checkct and check_termsofuse()) {
|
if ($checkct and check_termsofuse()) {
|
||||||
// As of Sept 2018, this code allows 'legacy' boinc clients to
|
// As of Sept 2018, this code allows 'legacy' boinc clients to
|
||||||
// create accounts. If consent_flag is null and client is an older
|
// create accounts. If consent_flag is null the code creates
|
||||||
// BOINC client, less than the minimum, creates an account without
|
// an account as normal and there is no update to the consent
|
||||||
// this new parameter, the account is created as normal and there
|
// DB table.
|
||||||
// is no update to the consent DB table.
|
|
||||||
//
|
//
|
||||||
// If BOINC client version is greater than or equal to the
|
// Logic:
|
||||||
// minimum defined, then assume consent has been given. Because
|
// * An old(er) BOINC Manager or third party GUI that doesn't
|
||||||
// the user must have clicked through the terms-of-use dialog
|
// * support the new consent features.
|
||||||
// box. In this case a new entry is created in the consent DB table.
|
// -> consent_flag not set (NULL).
|
||||||
|
// * A new(er) BOINC GUI, the terms of use are shown and user
|
||||||
|
// * agrees.
|
||||||
|
// -> consent_flag=1
|
||||||
|
// * A new or older GUI, terms of use shown but the user not
|
||||||
|
// * not agree.
|
||||||
|
// -> no create account RPC at all
|
||||||
//
|
//
|
||||||
// In the future, when the majority of BOINC clients and
|
// In the future, when the majority of BOINC clients and
|
||||||
// Account Managers have been updated to use the consent_flag
|
// Account Managers have been updated to use the consent_flag
|
||||||
|
@ -115,11 +120,6 @@ if ($user) {
|
||||||
// clients who do use this flag to continue. I.e., if
|
// clients who do use this flag to continue. I.e., if
|
||||||
// is_null($consent_flag) returns TRUE, then return an
|
// is_null($consent_flag) returns TRUE, then return an
|
||||||
// xml_error(-1, ...).
|
// xml_error(-1, ...).
|
||||||
$client_version = boinc_client_version();
|
|
||||||
if ($client_version >= MIN_BOINCCLIENT_VERSION_TOU) {
|
|
||||||
$consent_flag=1;
|
|
||||||
$source='BoincClient';
|
|
||||||
}
|
|
||||||
if ( (!is_null($consent_flag)) and $source) {
|
if ( (!is_null($consent_flag)) and $source) {
|
||||||
// Record the user giving consent in database - if consent_flag is 0,
|
// Record the user giving consent in database - if consent_flag is 0,
|
||||||
// this is an 'anonymous account' and consent_not_required is
|
// this is an 'anonymous account' and consent_not_required is
|
||||||
|
|
Loading…
Reference in New Issue