Skip to content

Conversation

@joragua
Copy link
Collaborator

@joragua joragua commented Oct 21, 2025

Related Issues

App: -

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

QA

Checks: #4698 (comment)

Reports:

@joragua joragua self-assigned this Oct 21, 2025
@joragua joragua changed the title [TECHNICAL] Add user rol to spaces table [TECHNICAL] Add user role to spaces table Oct 21, 2025
@joragua joragua force-pushed the technical/add_user_role_column_to_spaces branch 2 times, most recently from 929d303 to 2318b84 Compare October 21, 2025 14:59
@joragua joragua force-pushed the technical/add_user_role_column_to_spaces branch from 2318b84 to 85a208d Compare October 21, 2025 15:42
@joragua joragua marked this pull request as ready for review October 21, 2025 16:26
@joragua joragua requested a review from jesmrec October 21, 2025 16:34
@jesmrec
Copy link
Collaborator

jesmrec commented Oct 22, 2025

LGTM 👍

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 22, 2025

QA checks

  • Install from scratch
  • Install from stable (passed in CI)
  • Check DB new field
    • Check correct role
    • Check correct change of role
  • kws account (folders mapped into spaces)
  • Group handling
    • Only individual membership -> role
    • Only one group membership -> role of the group
    • Several group membership with different roles -> major role (manager > editor > viewer)
    • Several group membership with different roles and individual > major role (manager > editor > viewer)
    • Changes of permissions -> correctly reflected in DB
  • Upgrade from prev version

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 22, 2025

(1) [FIXED]

It seems to be some problems when grantedToV2 points to group instead of a user (by @joragua). The list of spaces is not refreshed and the snackbar server not reached is displayed

Xiaomi Redmi 13 Android 15
Galaxy Tab A8 Android 15
75d1b25a1b

@joragua
Copy link
Collaborator Author

joragua commented Oct 22, 2025

Regarding (1), I've added a new field (GroupResponse) to prevent errors while parsing the /me/drives response. I have also implemented additional logic to handle cases when the user belongs to a group with access to a space. The different scenarios for fetching and storing the role in the database are:

  • A user has direct access to a space -> User role
  • A user belongs to a group with access to a space -> Group role
  • A user belongs to several groups with access to a space -> Group role with higher priority
  • A mix: user has both individual and group access to a space -> Role with higher priority

@jesmrec
Copy link
Collaborator

jesmrec commented Oct 23, 2025

💯 ✅

@jesmrec jesmrec merged commit 8e51ed7 into master Oct 23, 2025
11 checks passed
@jesmrec jesmrec deleted the technical/add_user_role_column_to_spaces branch October 23, 2025 07:48
@joragua joragua added this to the 4.7 - Current milestone Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants