mattermost / mattermost-mobile

Next generation iOS and Android apps for Mattermost in React Native
https://about.mattermost.com/
Apache License 2.0
2.14k stars 1.3k forks source link

Invite people to team option missing for sysadmin and team admin #7970

Open infra-monkey opened 1 month ago

infra-monkey commented 1 month ago

Summary

Sysadmin and Team Admin roles can't invite people to team or add members to team.

Environment Information

Steps to reproduce

members do not have permission to invite people to a team. Open a team where you are either sysadmin or team admin. Tap the + icon on the top right corner.

Expected behavior

As described in the documentation I should get a Invite people to the team option.

$ mmctl permissions role show team_admin

Property      Value
--------      -----
Name          team_admin
DisplayName   authentication.roles.team_admin.name
BuiltIn       true
SchemeManaged true
Permissions   add_reaction
              add_user_to_team
              convert_private_channel_to_public
              convert_public_channel_to_private
              create_post
              create_public_channel
              create_team
              delete_others_posts
              delete_post
              delete_public_channel
              get_public_link
              import_team
              invite_user
              manage_channel_roles
              manage_incoming_webhooks
              manage_others_incoming_webhooks
              manage_others_outgoing_webhooks
              manage_others_slash_commands
              manage_outgoing_webhooks
              manage_private_channel_members
              manage_public_channel_members
              manage_public_channel_properties
              manage_slash_commands
              manage_team
              manage_team_roles
              playbook_private_manage_roles
              playbook_public_manage_roles
              read_private_channel_groups
              read_public_channel_groups
              remove_reaction
              remove_user_from_team
              use_channel_mentions
              use_group_mentions

Additional note, it works in browser and desktop app.

Observed behavior (that appears unintentional)

However I have only Browse Channels, Create New Channel and Open A Direct Message

Possible fixes

If you can, link to the line of code that might be responsible for the problem

amyblais commented 1 month ago

Hi @infra-monkey, I wasn't able to reproduce this just now. Do you have this setting enabled https://docs.mattermost.com/configure/authentication-configuration-settings.html#enable-email-invitations?

infra-monkey commented 1 month ago

Hi @amyblais thank you for the quick reply. These are my email settings

  "EmailSettings": {
    "EnableSignUpWithEmail": true,
    "EnableSignInWithEmail": true,
    "EnableSignInWithUsername": true,
    "SendEmailNotifications": false,
    "UseChannelInEmailNotifications": false,
    "RequireEmailVerification": true,
    "FeedbackName": "REDACTED",
    "FeedbackEmail": "REDACTED",
    "ReplyToAddress": "",
    "FeedbackOrganization": "",
    "EnableSMTPAuth": true,
    "SMTPUsername": "REDACTED",
    "SMTPPassword": "********************************",
    "SMTPServer": "REDACTED",
    "SMTPPort": "465",
    "SMTPServerTimeout": 10,
    "ConnectionSecurity": "TLS",
    "SendPushNotifications": true,
    "PushNotificationServer": "https://push-test.mattermost.com",
    "PushNotificationContents": "full",
    "PushNotificationBuffer": 1000,
    "EnableEmailBatching": false,
    "EmailBatchingBufferSize": 256,
    "EmailBatchingInterval": 30,
    "EnablePreviewModeBanner": false,
    "SkipServerCertificateVerification": false,
    "EmailNotificationContentsType": "full",
    "LoginButtonColor": "#0000",
    "LoginButtonBorderColor": "#2389D7",
    "LoginButtonTextColor": "#2389D7"
  },

But as I said, from the browser or the desktop app, it works. I have 50+ users that have all been invited by email from the browser. Is there something specific to the mobile client that is not considered for the other ones?

infra-monkey commented 1 month ago

Additional information if it can help. This is a non-ha docker install with nginx proxy doing the ssl termination. Public certificate provided by letsencrypt. Here is the full configuration of the server : mattermost-config.json

amyblais commented 1 month ago

Thank you, would you be open to posting about this on one of our troubleshooting forums, either at https://community.mattermost.com/core/channels/peer-to-peer-help or at https://forum.mattermost.com/?

infra-monkey commented 1 month ago

Sure no problem, any one is more suited than the other for this kind of issue?

amyblais commented 1 month ago

Both places are fine. Someone in the community or one of our devs may be able to help troubleshoot why the team invite is not showing on your app. Here is another document that may help: https://docs.mattermost.com/onboard/advanced-permissions.html#team-management.