Fix moderator status on broadcast (#51)
Co-authored-by: cake <admin@cakeandbanana.nl> Reviewed-on: #51 Co-authored-by: cake <cake@noreply.git.lightless-sync.org> Co-committed-by: cake <cake@noreply.git.lightless-sync.org>
This commit was merged in pull request #51.
This commit is contained in:
@@ -1150,11 +1150,11 @@ public partial class LightlessHub
|
||||
return false;
|
||||
}
|
||||
|
||||
var (isOwner, _) = await TryValidateOwner(dto.GID).ConfigureAwait(false);
|
||||
if (!isOwner)
|
||||
var (isOwnerOrMod, _) = await TryValidateGroupModeratorOrOwner(dto.GID).ConfigureAwait(false);
|
||||
if (!isOwnerOrMod)
|
||||
{
|
||||
_logger.LogCallWarning(LightlessHubLogger.Args("Unauthorized syncshell broadcast change", "User", UserUID, "GID", dto.GID));
|
||||
await Clients.Caller.Client_ReceiveServerMessage(MessageSeverity.Error, "You must be the owner of the syncshell to broadcast it.");
|
||||
await Clients.Caller.Client_ReceiveServerMessage(MessageSeverity.Error, "You must be the owner or moderator of the syncshell to broadcast it.");
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user