Details
-
Type:
Bug
-
Status: RESOLVED
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 21.0 [Tentative], 22.0 [Tentative]
-
Labels:
-
21 Status:Resolved
-
20 status:Please Merge
-
Test Plan:
Description
Currently when Lessons is importing a Common Cartridge it looks for a registered tool to match the incoming link to so that it has a key and secret. If it cannot find a tool with the URL, it makes a new empty tool with no secret and connects the link to the tool - the tools cannot be launched - until they are clocked once and a secret is set for the newly created tool.
The import code does remove the query string when looking for tools to avoid a crazy proliferation of new tools.
This works but is less than ideal. The URL matching should try a little harder to find a tool before giving up and making a new tool that is missing a secret.
The way this will be done is
- Look for a local tool with an exact match
- Next we snip off the query string and check for a local tool
- Next we look for a local tool that has a prefix match that at least includes protocol and host
Then we go through the global tools following the same priority:
- Look for a global tool with an exact match
- Next we snip off the query string and check for a global tool
- Next we look for a global tool that has a prefix match that at least includes protocol and host
After all that if we can't find a matching tool, we punt and make a new tool without a secret (current behavior).
The local comes first to allow for an override - but in general - the most common case is that there will be no per-site (i.e. local) tools installed in the site so they will just find globally installed tools. And if you disallow per-site tool creation, then the fact that per-site tools are checked first does not matter.