← Back to team overview

mahara-contributors team mailing list archive

[Bug 1716541] A change has been merged

 

Reviewed:  https://reviews.mahara.org/8009
Committed: https://git.mahara.org/mahara/mahara/commit/f8002f1eb31c223480070985abdd46cd9cdd1472
Submitter: Robert Lyon (robertl@xxxxxxxxxxxxxxx)
Branch:    master

commit f8002f1eb31c223480070985abdd46cd9cdd1472
Author: Robert Lyon <robertl@xxxxxxxxxxxxxxx>
Date:   Tue Sep 12 13:15:05 2017 +1200

Bug 1716541: Allowing the check of 'mahara' institution for LTI login

behatnotneeded

Change-Id: I35b138d579156f032688178d3d4ed391555fe155
Signed-off-by: Robert Lyon <robertl@xxxxxxxxxxxxxxx>

-- 
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:
  Fix Committed
Status in Mahara 17.04 series:
  In Progress
Status in Mahara 17.10 series:
  Fix Committed

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