Add the creator of the board as a administrator of the board if it still belongs to the channel (#3454)

This commit is contained in:
Jesús Espino 2022-07-28 18:45:00 +02:00 committed by GitHub
parent b9ac00ef4e
commit cd756a97f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -302,7 +302,7 @@ INSERT INTO {{.prefix}}board_members (
SELECT B.Id, CM.UserId, CM.Roles, TRUE, TRUE, FALSE, FALSE
FROM {{.prefix}}boards AS B
INNER JOIN ChannelMembers as CM ON CM.ChannelId=B.channel_id
WHERE CM.SchemeAdmin=True
WHERE CM.SchemeAdmin=True OR (CM.UserId=B.created_by)
);
{{end}}