Skip to content

[BUG] Remove share icon from top bar in kws accounts #5008

Closed

Description

@jesmrec

Regular servers shows a share icon on the top bar:

Image

it should be hidden for kws servers, since sharing is not an available feature (as today)

Also, take in account the following comment #5022 (comment): Share option should not be available in the bottom sheet.

TASKS

  • Research (if needed)
  • Create branch fix/remove_share_option_in_kws_accounts
  • Development tasks
    • Remove Share option from top bar
    • Remove Share from bottom sheet
    • Implement unit tests (if needed)
  • Code review and apply changes requested
  • Design test plan
  • QA
  • Merge branch fix/remove_share_option_in_kws_accounts into master

Activity

  1. added this to the 4.9 - Current milestone on Oct 9, 2026
  2. self-assigned this
    on Oct 28, 2026
  3. joragua commented on Oct 28, 2026

    @joragua
    Member

    Problem

    Regular oC10/oCIS servers show a share icon in the top app bar and a Share option in the file bottom sheet. Kiteworks (kws) accounts do not support sharing as a feature today, yet these affordances are still rendered for them. A kws user who taps the share icon or the Share bottom-sheet option reaches a flow that cannot work on their server (confirmed in PR #5022 comment).


    Desired behavior

    When the current account is a Kiteworks server, every entry point to the sharing flow is hidden:

    • The per-file share icon in the contextual action bar / file-actions toolbar is not shown.
    • The "share current folder" icon in the main top app bar is not shown.
    • The share icon in the file details screen is not shown.
    • The Share option in the file bottom sheet is not listed.

    For non-kws accounts, behavior is unchanged.


    User stories

    • As a Kiteworks user, I don't want to see a share icon in the top bar, because sharing is not available on my server.
    • As a Kiteworks user, I don't want a Share option in the file bottom sheet, so I'm not led into a flow that can't complete.

    Constraints

    • No behavior change for non-kws (oC10/oCIS) accounts.
    • Detection must rely on data already stored at login/session time — no additional network call.

    Acceptance criteria

    • On a Kiteworks account, the per-file share icon (R.id.action_share_file) is not visible in the action mode toolbar nor in the file details screen.
    • On a Kiteworks account, the "share current folder" icon (R.id.action_share_current_folder) is not visible in the main top app bar.
    • On a Kiteworks account, Share (FileMenuOption.SHARE) does not appear as a row in the file bottom sheet.
    • On a non-kws account, all share affordances remain exactly as today.
    • The kws check is derived from already-stored data (capabilities and/or the persisted account flag); no extra network request is made.

    Out of scope

    • Changing the sharing flow itself, or enabling any sharing capability on kws servers.
    • Hiding other kws-unsupported features not related to sharing.
    • Server-side enablement of sharing for Kiteworks.

    Assumptions

    • A Kiteworks account can be identified from the stored capabilities: a kws server has multiSpace enabled, i.e. capability.spaces?.hasMultiplePersonalSpaces == true (the same signal already read by CapabilityViewModel.checkMultiPersonal()).
    • Additionally, the kws nature is persisted at login as AccountManager user data under KEY_IS_KITEWORKS_SERVER = "is_kiteworks_server" (written in OCLocalAuthenticationDataSource), available as a fallback/alternative without any network request. This flag is currently read only in the auth layer (OwnCloudAccount, AccountAuthenticator, LoginActivity) and never in the file-UI presentation layer.
    • Both the top-bar icon and the bottom-sheet Share row are driven by the same source of truth: FilterFileMenuOptionsUseCase.run(...) returns the list of FileMenuOptions, applied to the toolbar via Menu.filterMenuOptions (MenuExt.kt) and to the bottom sheet via MainFileListFragment.setMenuOption. Suppressing FileMenuOption.SHARE there removes the affordance from both at once.
    • FilterFileMenuOptionsUseCase.run already fetches the capabilities for the account (capability = capabilityRepository.getStoredCapabilities(params.accountName)), so the multiSpace/kws check can be done in place with no change to Params and no new dependency.
    • The "share current folder" icon is handled separately in MainFileListFragment.onCreateOptionsMenu (already conditionally removed when picking a folder / non-personal space), so it needs an additional kws check there.

    Implementation notes

  4. changed the title [-][FEATURE REQUEST] Remove share icon from top bar in kws accounts[/-] [+][BUG] Remove share icon from top bar in kws accounts[/+] on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions