Remove remote users from the license counting and explicitly dissallow them to log in (#22582)

* Making all the counts aware of Remote users

* Disable login for remote users

* Adding tests for login remote_users error

* Adding tests for the store

* Adding frontend part of not counting remote users in the license

* Addressing PR review comment

* Adding the new ExternaUserId field to users

* Running make migrations-extract

* Running make app-layers and make gen-serialized

* Revert "Adding the new ExternaUserId field to users"

This reverts commit 12e5fd518962a16cdbdb8964179b6cd8e915f230.

* Adding GetUserByRemoteID methods

* Adding needed migration for users

* i18n-extract

* Fixing postgres increase remote user id field size migration up and down

* run make gen-serialized

* Removing migration code

* Not count remote users as part of the cloud pricing

* Add the cloud subscription when a user gets promote from remote to not-remote

* Fixing merge problems

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
Jesús Espino
2023-08-14 17:54:10 +02:00
коммит произвёл GitHub
родитель 5a349873f7
Коммит 5f7482e541
19 изменённых файлов: 295 добавлений и 3 удалений

Просмотреть файл

@@ -2,11 +2,13 @@
// See LICENSE.txt for license information.
import React from 'react';
import {FormattedMessage} from 'react-intl';
import {Link} from 'react-router-dom';
import {ConnectedComponent} from 'react-redux';
import BotTag from 'components/widgets/tag/bot_tag';
import Tag from 'components/widgets/tag/tag';
import {Client4} from 'mattermost-redux/client';
@@ -154,6 +156,16 @@ export default class UserListRowWithError extends React.PureComponent<Props, Sta
/>
{this.props.user.is_bot && <BotTag/>}
{this.props.user.remote_id && (
<Tag
text={
<FormattedMessage
id='admin.user_item.remoteUser'
defaultMessage='Remote user'
/>
}
/>
)}
</div>
<div
id={userCountEmail || undefined}

Просмотреть файл

@@ -2561,6 +2561,7 @@
"admin.user_item.mfaNo": "**MFA**: No",
"admin.user_item.mfaYes": "**MFA**: Yes",
"admin.user_item.promoteToMember": "Promote to Member",
"admin.user_item.remoteUser": "Remote user",
"admin.user_item.resetEmail": "Update Email",
"admin.user_item.resetMfa": "Remove MFA",
"admin.user_item.resetPwd": "Reset Password",

Просмотреть файл

@@ -133,6 +133,7 @@ export type GetFilteredUsersStatsOpts = {
in_channel?: string;
include_deleted?: boolean;
include_bots?: boolean;
include_remote_users?: boolean;
roles?: string[];
channel_roles?: string[];
team_roles?: string[];