← Back to team overview

mahara-contributors team mailing list archive

[Bug 1716541] A patch has been submitted for review

 

Patch for "master" branch: https://reviews.mahara.org/8009

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1716541

Title:
  LTI Integration - non-admin user in 'No institution' unable to login

Status in Mahara:
  In Progress
Status in Mahara 17.04 series:
  In Progress
Status in Mahara 17.10 series:
  In Progress

Bug description:
  We do a check:

  if (!$is_site_admin) {
    // check user is member of configured OAuth institution
    $institutions = array_keys(load_user_institutions($userid));
    if (!in_array($WEBSERVICE_INSTITUTION, $institutions)) {
    ... throw error and stop them logging in ...
    }
  }

  The problem begins when we check what institutions they are in

   load_user_institutions($userid);

  This only returns an array of institutions if the user is in 1 or more true institutions.
  If they are not in a true institution they are in the 'No institution' (mahara) one.

  We have already got a $userid from earlier in code so we know a user
  exists we just need to test them against the $WEBSERVICE_INSTITUTION
  so in the case they are in no institution the $WEBSERVICE_INSTITUTION
  should equal 'mahara' and if so log them in and if not stop them.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1716541/+subscriptions


References