Skip to content

Conversation

@JaCaLlaSchwarz
Copy link
Collaborator

@JaCaLlaSchwarz JaCaLlaSchwarz commented Jan 27, 2026

BugWPB-20582 [iOS] UI issue: Federated user in a channel has the option to add users

Issue

Federated guest users can add members to a conversation to which they have been invited.

Testing (attached video: BeforeFix_WPB20582)

  1. Login in with a Federated account user.
  2. Open 'Patata' conversation
  3. Select Details
    PROBLEM: The '+ Add Participants' option appears. (at bottom-left)
    EXPECTED: The option must not appear, when user is guest.
BeforeFix_WPB20582

Evidences

Before fix After fix
BeforeFix_WPB20582 AfterFix_WPB20582
Video Video

Cause

The system does not validate that a Guest user is restricted from adding members. Specification: https://wearezeta.atlassian.net/wiki/spaces/ENGINEERIN/pages/18416694/Team#Guests

Solution

Add an extra check for validating that Guest users cannot add new members.

Testing

Unit test 'testCanAddParticipantsInChannelIfAddParticipantsIsAdminAndMemberButGuest' validates that button can be added when user conversation is not guest, and cannot otherwise.

Manual test

  • Login with a federated account and check that CANNNOT be added members on a conversation were user was a guest.
  • Login with a regular account and check that CAN be added members on a conversation.

Checklist

  • Title contains a reference JIRA issue number like [WPB-XXX].
  • Description is filled and free of optional paragraphs.
  • Adds/updates automated tests.

UI accessibility checklist

If your PR includes UI changes, please utilize this checklist:

  • Make sure you use the API for UI elements that support large fonts.
  • All colors are taken from WireDesign.ColorTheme or constructed using WireDesign.BaseColorPalette.
  • New UI elements have Accessibility strings for VoiceOver.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

Test Results

    2 files    543 suites   6m 23s ⏱️
4 240 tests 4 211 ✅ 27 💤 2 ❌
4 240 runs  4 213 ✅ 27 💤 0 ❌

For more details on these failures, see this check.

Results for commit de27f5f.

♻️ This comment has been updated with latest results.

Summary: workflow run #21437654621
Allure report (download zip): html-report-27344

Copy link
Collaborator

@netbe netbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM;)

Copy link
Contributor

@David-Henner David-Henner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you're using the wrong value to check isGuest

Comment on lines 131 to 133
public var isGuest: Bool {
accessRoles.contains(.guest)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

accessRoles defines which user roles are allowed in the conversation. To me, the isGuest naming is confusing. A conversation itself cannot be a guest, whereas a user could be a guest in a conversation.
I think a better name for this would be areGuestsAllowed. But even then, I don't think this is the correct value to look at, I think you should rather verify wether the user is a guest

Comment on lines 88 to 90
let isPublicChannelAccessNoGuest = conversation.isChannel
&& conversation.privateChannelPermission == .everyone
&& !conversation.isGuest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This checks wether:

  • The conversation is a channel
  • The permissions are set to everyone
  • Guests aren't allowed in the conversation <- wrong check

Here I think we should verify if the user is a guest

…hub.com:wireapp/wire-ios into fix/do-no-allow-add-members-when-guest_WPB20582
Comment on lines +131 to +133
public var areGuestsAllowed: Bool {
accessRoles.contains(.guest)
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry about the misunderstanding, but I meant that you shouldn't use this


let isPublicChannelAccessNoGuest = conversation.isChannel
&& conversation.privateChannelPermission == .everyone
&& !conversation.areGuestsAllowed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here, we should verify that the user isn't a guest, not that the conversation doesn't allow guests

@datadog-wireapp
Copy link

datadog-wireapp bot commented Jan 28, 2026

✅ Tests

🎉 All green!

❄️ No new flaky tests detected
🧪 All tests passed

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: de27f5f | Docs | Was this helpful? Give us feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants