public static bool CanDeleteComment(CommentContract comment) { ParamIs.NotNull(() => comment); return Manager.HasPermission(PermissionToken.DeleteComments) || (comment.Author != null && User != null && comment.Author.Id == User.Id); }
public CommentViewModel(CommentContract comment, string targetName, string targetUrl) { Comment = comment; TargetName = targetName; TargetUrl = targetUrl; }