Project

General

Profile

Bug #6346

Admin can't access to the portal due the legal conditions.

Added by Julio Montoya over 6 years ago. Updated almost 6 years ago.

Status:
Bug resolved
Priority:
Normal
Category:
Global / Others / Misc
Target version:
Start date:
03/07/2013
Due date:
% Done:

100%

Estimated time:
Spent time:
Complexity:
Normal
SCRUM pts - complexity:
?

Description

The error is located in local.inc.php

ConditionalLogin::check_conditions($uData);

This function returns false, for everybody:

function check_platform_legal_conditions($user) {             
    if (api_get_setting('allow_terms_conditions') == 'true') {
        $term_and_condition_status = api_check_term_condition($user['user_id']);
        // @todo not sure why we need the login password and update_term_status
        if ($term_and_condition_status == false) {
            $_SESSION['term_and_condition'] = array('user_id'           => $user['user_id'],
                                                    //'login'             => $user['username'],
                                                    //'password'          => $user['password'],
                                                    //'update_term_status' => true,
            );
            return false;
        } else {
            unset($_SESSION['term_and_condition']);
            return true;
        }
    } else {
        //No validation user can pass
        return true;
    }
}

See: https://task.beeznest.com/issues/6275

History

#1

Updated by Julio Montoya over 6 years ago

  • Description updated (diff)
#2

Updated by Yannick Warnier over 6 years ago

  • Category set to Global / Others / Misc
  • Status changed from New to Assigned
  • Assignee set to Yannick Warnier
#3

Updated by Yannick Warnier about 6 years ago

  • Description updated (diff)
#4

Updated by Yannick Warnier almost 6 years ago

  • Assignee changed from Yannick Warnier to Julio Montoya

I guess you can check and fix it as well as I would do, Julio.
The legal terms should not prevent an admin to enter, but they should prevent other users if they haven't approved the terms.
Preventing them access should never lock them down.

I think this issue has been fixed somehow with another bugfix, but it is still necessary to check it.

#5

Updated by Yannick Warnier almost 6 years ago

  • Assignee changed from Julio Montoya to Francis Gonzales
#6

Updated by Francis Gonzales almost 6 years ago

Is there an special way to configure this functionality? or is this a default behavior?.

I was testing this function and it is returning true.

#7

Updated by Francis Gonzales almost 6 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Francis Gonzales to Yannick Warnier
#8

Updated by Yannick Warnier almost 6 years ago

  • Status changed from Needs more info to Assigned
  • Assignee changed from Yannick Warnier to Francis Gonzales
  • % Done changed from 0 to 10

You have to look for the allow_terms_conditions. You can look for the term itself in the administration panel, platform settings.
If you enable it, you should get an additional option in the administration panel to "Configure terms and conditions". Once you do, you can disconnect and you'll see the effect reported above.

#9

Updated by Francis Gonzales almost 6 years ago

  • Status changed from Assigned to Needs more info
  • Assignee changed from Francis Gonzales to Yannick Warnier
  • % Done changed from 10 to 50

This feature is working. But It needs to have a row in the legal table, if not the terms won't appear.

Should I force the user to add the terms once they enable it?

SELECT count(*) as count_result 
FROM `chamilo19x`.`legal` 
ORDER BY legal_id DESC

#10

Updated by Yannick Warnier almost 6 years ago

OK, but the message has to be clear and point directly to the terms and conditions configuration.

There should also be a check that verifies that there is something in the legal table and prevent the activation of thecheck if there is nothing (make "as if" the option was disabled when there are no terms).

#11

Updated by Yannick Warnier almost 6 years ago

  • Status changed from Needs more info to Bug resolved
  • % Done changed from 50 to 100

Francis tells me that the issue is a non-issue at the moment and that it doesn't block you anymore, so marking as fixed (my suggestion is actually already working as expected, without code changes).

Also available in: Atom PDF