Only display web services groups with OAuth1/OAuth2 in 'External apps'

Bug #1947533 reported by Kristina Hoeppner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Wishlist
Dianne Tennent

Bug Description

This is an issue discovered as part of bug #1947529 and slightly related to bug #1947529.

At the moment, all web services groups that are set up in the web services configuration are displayed on the 'External apps' screen even if they aren't using OAuth1 or OAuth2. The 'External apps' screen should only display those apps that can actually be used for the intended purpose.

Therefore, we need a new Yes/No switch on the 'Edit' screen for a service group to indicate whether it can be displayed in the drop-down menu for 'External apps'.

This should go in the first section on the page /webservice/admin/serviceconfig.php?service=ID

right below 'Short name' with the label 'External app'.

To replicate the issue:

1. Enable web services on your site.
2. Set up a new web services group in Admin menu -> Web services -> Configuration -> Manage services group -> Add a new one.
3. Enable it via the 'Edit' button and add one web service call to it.
4. Save.
5. Go to Admin menu -> Web services -> External apps.

Expected result: Only LTI, LTI Advantage, and Mahara / Moodle assignment submission are potential options.

Actual result: The newly created web services group shows up, too.

What should happen when the issue is fixed:

1. Enable web services on your site.
2. Set up a new web services group 'Auth' in Admin menu -> Web services -> Configuration -> Manage services group -> Add a new one.
3. Enable it via the 'Edit' button.
4. There is a new option 'External app' with a Yes/No switch. Switch this to 'Yes'
5. Add one web service call to it and save the form.
5. Set up a new web services group 'Not auth' in Admin menu -> Web services -> Configuration -> Manage services group -> Add a new one.
6. Enable it via the 'Edit' button.
7. There is a new option 'External app' with a Yes/No switch. Leave this set to 'No'.
8. Add one web service call to it and save the form.
9. Go to Admin menu -> Web services -> External apps.

Further specs:
 - For LTI, LTI Advantage, and Mahara / Moodle assignment, their 'Edit' pages must have the 'External app' switch set to 'Yes' by default
 - Ideally, the 'External app' switch for these three services is greyed out (i.e. inactive, cannot be changed)

Expected result: The web services group 'Auth' (along with LTI, LTI Advantage, and Mahara / Moodle assignment) is displayed in the drop-down menu, but 'Not auth' is not shown.

This fix should be followed by bug #1947528

Tags: manualupdate
description: updated
description: updated
description: updated
description: updated
Revision history for this message
Mahara Bot (dev-mahara) wrote : A patch has been submitted for review

Patch for "main" branch: https://reviews.mahara.org/12330

Changed in mahara:
assignee: nobody → Dianne Tennent (dianne-t)
status: Confirmed → In Progress
Revision history for this message
Dianne Tennent (dianne-t) wrote :
Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/12330
Committed: https://git.mahara.org/mahara/mahara/commit/cd25fb2644df3dd99fbe064657def8cffb4d48cd
Submitter: Robert Lyon (<email address hidden>)
Branch: main

commit cd25fb2644df3dd99fbe064657def8cffb4d48cd
Author: Dianne Tennent <email address hidden>
Date: Mon Jan 10 17:37:34 2022 +1300

Bug 1947533: Limit options in 'External apps'

Create 'has_oauth' function to check both default and
custom webservices groups for LTI/OAuth capability

Change-Id: I0d3533f2a1352e131378423674b5e349144c864d

Robert Lyon (robertl-9)
Changed in mahara:
status: In Progress → Fix Committed
tags: added: manualupdate
Revision history for this message
Dianne Tennent (dianne-t) wrote (last edit ):

Regarding this spec: "4. There is a new option 'External app' with a Yes/No switch. Switch this to 'Yes'"

The switch has not been implemented (as this became too complex, differentiation between OAuth vs non-OAuth webservices groups, this has been addressed here: https://reviews.mahara.org/c/mahara/+/12366)

But if the service group has a function that uses OAuth, then it will appear in the External Apps page, if not, it won't.

Gold (gold.catalyst)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.