Exemplo n.º 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);
        }
Exemplo n.º 2
0
 public CommentViewModel(CommentContract comment, string targetName, string targetUrl)
 {
     Comment = comment;
     TargetName = targetName;
     TargetUrl = targetUrl;
 }