Exemplo n.º 1
0
        public string DeleteComment(int commentId)
        {
            var comment = new Businesslogic.Comment(commentId);
            comment.Delete();

            return "true";
        }
        public string DeleteComment(int commentId)
        {
            var comment = new Businesslogic.Comment(commentId);

            comment.Delete();

            return("true");
        }
Exemplo n.º 3
0
        public static string DeleteComment(int commentId)
        {
            var currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0;

            if (User.GetCurrent() != null || Xslt.IsMemberInGroup("admin", currentMember))
            {
                var comment = new Businesslogic.Comment(commentId);
                comment.Delete();

                return "true";
            }

            return "false";
        }
Exemplo n.º 4
0
        public static string DeleteComment(int commentId)
        {
            var currentMember = HttpContext.Current.User.Identity.IsAuthenticated ? (int)Membership.GetUser().ProviderUserKey : 0;

            if (User.GetCurrent() != null || Xslt.IsMemberInGroup("admin", currentMember))
            {
                var comment = new Businesslogic.Comment(commentId);
                comment.Delete();

                return("true");
            }

            return("false");
        }