Add UDI support for relation, user and user-group entity types#17490
Conversation
There was a problem hiding this comment.
Besides adding Relation, User and UserGroup, I've re-ordered the existing ones alphabetically, grouped per 'UDI type'.
AndyButland
left a comment
There was a problem hiding this comment.
Looks fine to me and would allow cleaning up some code in Deploy where we have to work around the fact that some entities - in particular user groups - don't have full support for UDIs.
Only issue may be timing of course... as we're pretty close to final release now. If @bergmania doesn't feel we can get this in for 15, then we could retarget for 16 and continue the workarounds in Deploy for one more version. But hopefully it's OK as the changes other than any reformatting are quite small.
Just to explain the background, this has come up in a review for a new feature we are working on in Deploy, which currently has some ugly workarounds for this issue. So it isn't needed specifically for the release of Deploy running on Umbraco 15; rather it's to support a feature we'll look to bring out shortly after.
|
Looks okay to me |
Prerequisites
Description
While trying to add support for schema deployment of user groups in Deploy (to fix issue umbraco/Umbraco.Deploy.Issues#237), we already noticed v13 doesn't persist the user group GUID key to the database (but returns a random GUID after each save) and likely because of that also doesn't support getting the UDI for this entity (as UDIs use either a GUID or string value for the identifier part).
Instead of working around all
IEntity.GetUdi()calls in Deploy, this PR adds UDI support for the following entity types:umb://relation/GUIDumb://user/GUIDumb://user-group/GUIDI've also updated the GetUdi() extension methods on
ScriptandStylesheetto their interfaces and obsoleted theUdiParserServiceConnectorsclass (which isn't used by the CMS or Deploy anymore).The unit tests are updated to include verifying whether the extension method works for these new types and the
IScriptandIStylesheetinterfaces.