Change lightfinder permissions for groups
This commit is contained in:
@@ -995,11 +995,11 @@ public partial class LightlessHub
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
var (isOwner, _) = await TryValidateOwner(dto.GID).ConfigureAwait(false);
|
var (isOwner, _) = await TryValidateGroupModeratorOrOwner(dto.GID).ConfigureAwait(false);
|
||||||
if (!isOwner)
|
if (!isOwner)
|
||||||
{
|
{
|
||||||
_logger.LogCallWarning(LightlessHubLogger.Args("Unauthorized syncshell broadcast change", "User", UserUID, "GID", dto.GID));
|
_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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ public class ServerFilesController : ControllerBase
|
|||||||
{
|
{
|
||||||
hash = hash.ToUpperInvariant();
|
hash = hash.ToUpperInvariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
var existingFile = await dbContext.Files.SingleOrDefaultAsync(f => f.Hash == hash);
|
var existingFile = await dbContext.Files.SingleOrDefaultAsync(f => f.Hash == hash);
|
||||||
if (existingFile != null) return Ok();
|
if (existingFile != null) return Ok();
|
||||||
|
|
||||||
@@ -273,6 +274,7 @@ public class ServerFilesController : ControllerBase
|
|||||||
{
|
{
|
||||||
hash = hash.ToUpperInvariant();
|
hash = hash.ToUpperInvariant();
|
||||||
}
|
}
|
||||||
|
|
||||||
var existingFile = await dbContext.Files.SingleOrDefaultAsync(f => f.Hash == hash);
|
var existingFile = await dbContext.Files.SingleOrDefaultAsync(f => f.Hash == hash);
|
||||||
if (existingFile != null) return Ok();
|
if (existingFile != null) return Ok();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user