Permalinks (oCIS) / Private links (oC10) should be always reachable. As the app is built, that option is set inside of the Share menu (or Members in case of the space management).
That means, sharing option should be always displayed, and then, inside of it, the permalink. Other options/capabilities will rule whether the "sharing with users" or "sharing by link" will be available.
Current condition in FilterFileMenuOptionsUseCase.kt
if (!onlyAvailableOfflineFiles && shareViaLinkOrWithUsersAllowed && resharingAllowed &&
hasResharePermission) {
!onlyAvailableOfflineFiles -> make it unavailable in the av. offline shortcut
shareViaLinkOrWithUsersAllowed -> checks in setup.xml whether share_via_link_feature or share_with_users_feature are true
resharingAllowed -> it's true if the item is not "shared with me" (so, it's an item of my list) or the resharing capability is true
hasResharePermission -> it's true if there is only one item selected (no multiselection) and the item itself has the resharing (R in the oc:permissions from the PROPFIND response)
That condition was built for oC10, but oCIS has a different background. Basically, oCIS does not allow resharing (capability always comes with a false) and those items in custom spaces with no sharing permissions, come from server with empty oc:permissions.
TO DO's:
TASKS
Permalinks (oCIS) / Private links (oC10) should be always reachable. As the app is built, that option is set inside of the
Sharemenu (orMembersin case of the space management).That means, sharing option should be always displayed, and then, inside of it, the permalink. Other options/capabilities will rule whether the "sharing with users" or "sharing by link" will be available.
Current condition in
FilterFileMenuOptionsUseCase.kt!onlyAvailableOfflineFiles-> make it unavailable in the av. offline shortcutshareViaLinkOrWithUsersAllowed-> checks insetup.xmlwhethershare_via_link_featureorshare_with_users_featurearetrueresharingAllowed-> it'strueif the item is not "shared with me" (so, it's an item of my list) or the resharing capability istruehasResharePermission-> it's true if there is only one item selected (no multiselection) and the item itself has the resharing (Rin theoc:permissionsfrom the PROPFIND response)That condition was built for oC10, but oCIS has a different background. Basically, oCIS does not allow resharing (capability always comes with a
false) and those items in custom spaces with no sharing permissions, come from server with emptyoc:permissions.TO DO's:
Find the way to make reachable the permalink/private link in all cases:
oC10: for owned items and for "shared with me items" , regardless the
resharingorsharingcapability values. Whenresharingis false, an item "shared with me" in oC10 does not showShare, therefore private link is no accesible (bug to fix).oCIS: Show the
Shareitem regardless theRpermission. That permission is used to show the options in the Share view. TODO: check if there is any other permission available in the Graph API for that aim)TASKS