fix: copy app name if product name isn't provided #10490
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is mostly to help with the upgrade from OCIS 6 to 7. The
COLLABORATION_APP_PRODUCT
is new in OCIS 7 and is needed in order to identify the target product (Collabora, OnlyOffice) and distinguish it from the app name, which could be a brand (CoolBox3, PrivateOffice, etc)In OCIS 6, the
COLLABORATION_APP_NAME
acted as product name, so it was mostly limited to "Collabora", "OnlyOffice" and "Microsoft" values, but this won't be the case any longer.The problem comes during the upgrade, where the product name might not be filled yet. This means that an "OnlyOffice" product (set in
COLLABORATION_APP_NAME
) might be mistakenly consider as a "Collabora" product (the default). This mistake could cause issues: so far we've detected that the "OnlyOffice" editor would open in view-only mode despite the user having enough permissions.In order to make things easier, if the product name is not filled, the app name will be copied over.
COLLABORATION_APP_NAME
is expected to follow the name limitations from OCIS 6.After the upgrade from 6 to 7, it is expected that, if there is a change in the
COLLABORATION_APP_NAME
, theCOLLABORATION_APP_PRODUCT
should be filled and / or adjusted.Related Issue
Related to #10479
Motivation and Context
Less friction with the upgrade.
How Has This Been Tested?
Manually tested by removing the
COLLABORATION_APP_PRODUCT
env variable. The OnlyOffice installation (with "OnlyOffice" asCOLLABORATION_APP_NAME
) can edit the files.Screenshots (if appropriate):
Types of changes
Checklist: