-
Bug
-
Resolution: Fixed
-
Major
-
4.3
-
MOODLE_403_STABLE
-
MOODLE_403_STABLE
-
MDL-78750-master-int -
-
2
-
Team Hedgehog 2023 Sprint 3.2, Team Hedgehog 2023 Sprint 3.3
The current way the matrix settings are configured causes multiple issues and limitations that we should be able to resolve reasonably easily:
- Generating a refresh token (which we currently have as a required field) triggers a short expiry time for the access token (5 mins by default). We are also not using that token to refresh access, so it's essentially just making this impractical to use. We should therefore just remove the refresh token setting altogether.
- For the remaining settings (home server URL and access token), those are currently required fields, which means if the communication subsystem is enabled, you are forced to input values even if you aren't ready to set up matrix (or don't intend to). We need to update those fields to be optional.
- After the changes in #2 are made, the existing system will assume if the plugin is enabled it is configured and ready to use, so matrix could be enabled on courses, which will cause errors when it attempts to set up a room/users. So the final step will be to make the necessary changes so where we check if the plugin is enabled/available for use, we also ensure that the matrix settings are not empty.
- Update any automated testing to reflect the changes (eg not filling in the refresh token now it doesn't exist), and add appropriate testing where needed (eg confirming expected behaviour where communication/matrix are enabled, but matrix settings are not configured).
#3 is not a new concept in Moodle, for example some auth plugins such as LDAP can be "enabled" even though none of the settings to connect them to an external system and be functional are configured, they just won't be available on the login screen. So it may be worth having a quick look at how they handle that situation, if you need some ideas about how to approach it.