Beispiel #1
0
        public static bool HasAccess(ISession session, DBlog.Data.Image image, string ticket)
        {
            if (image.PostImages == null || image.PostImages.Count == 0)
            {
                return(true);
            }

            foreach (PostImage pi in image.PostImages)
            {
                if (TransitPost.GetAccess(session, pi.Post, ticket))
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #2
0
        public static bool HasAccess(ISession session, DBlog.Data.Comment comment, string ticket)
        {
            if (comment.PostComments == null || comment.PostComments.Count == 0)
            {
                return(true);
            }

            foreach (PostComment pi in comment.PostComments)
            {
                if (TransitPost.GetAccess(session, pi.Post, ticket))
                {
                    return(true);
                }
            }

            return(false);
        }
Beispiel #3
0
 public TransitPostComment(ISession session, DBlog.Data.PostComment o, string ticket)
     : base(session, o.Post.Id, o.Comment, TransitPost.GetAccess(session, o.Post, ticket))
 {
     AssociatedType = "Post";
 }