Example #1
0
        public static bool CanDeleteComment(CommentContract comment)
        {
            ParamIs.NotNull(() => comment);

            return Manager.HasPermission(PermissionToken.DeleteComments)
                || (comment.Author != null && User != null && comment.Author.Id == User.Id);
        }
Example #2
0
 public CommentViewModel(CommentContract comment, string targetName, string targetUrl)
 {
     Comment = comment;
     TargetName = targetName;
     TargetUrl = targetUrl;
 }