Moderators can punish their own posts

main
Inga 🏳‍🌈 15 years ago
parent 00dd5628ba
commit 52f26baa20
  1. 4
      Common/dataobjects/Post.cs
  2. 1
      IISMainHandler/handlers/response/PunishHandler.cs

@ -368,8 +368,6 @@ namespace FLocal.Common.dataobjects {
if(transferInfo.HasValue && !transferInfo.Value.newBoard.isTransferTarget) throw new FLocalException("You cannot transfer in '" + transferInfo.Value.newBoard.name + "'");
}
if(account.user.id == this.poster.id) throw new FLocalException("You cannot punish your own posts");
lock(this.Punish_Locker) {
lock(this.thread.locker) {
@ -561,7 +559,7 @@ namespace FLocal.Common.dataobjects {
} catch(NotFoundInDBException) {
}
if(posterAccount != null) {
if((posterAccount != null) && (posterAccount.id != account.id)) {
PMMessage newMessage = PMConversation.SendPMMessage(
account,
posterAccount,

@ -22,7 +22,6 @@ namespace FLocal.IISHandler.handlers.response {
Post post = Post.LoadById(int.Parse(context.requestParts[1]));
if(!Moderator.isModerator(context.account, post.thread)) throw new FLocalException(context.account.id + " is not a moderator in board " + post.thread.board.id);
if(context.account.user.id == post.poster.id) throw new FLocalException("You cannot punish your own posts");
return new XElement[] {
post.thread.board.exportToXml(context, Board.SubboardsOptions.None),

Loading…
Cancel
Save