owncloud / owncloud/android

[FEATURE REQUEST] Permalink reachability (oC10/oCIS)

Open
#4,939 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature request Share by Public Link Share with users
Dominant language
Kotlin
Stars
4.2k
Forks
3.1k
Avg merge
1d 12h
Merged PRs (30d)
7

Description

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:

  • 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 resharing or sharing capability values. When resharing is false, an item "shared with me" in oC10 does not show Share, therefore private link is no accesible (bug to fix).

    • oCIS: Show the Share item regardless the R permission. 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
  • Research (if needed)
  • Create branch feature/feature_name
  • Development tasks
    • Implement whatever
    • ...
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch feature/feature_name into master

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in FilterFileMenuOptionsUseCase.kt and trace how the Share or Members menu is made available for oC10 and oCIS items, including the capability and permission values described in the issue. Check setup.xml and the Graph API permission information before defining the test plan. Done means the permalink/private-link entry is reachable for the listed owned and shared-item cases on both platforms, with unit tests where needed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
authorization, mobile
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
58/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.