Example #1
0
        public Page Get(string pageId, User subject)
        {
            if (!membershipInterface.IsReader(pageId, subject))
            {
                throw new NotAuthorized();
            }

            return(pageInterface.GetById(pageId));
        }
Example #2
0
        public void CreatePageTest2()
        {
            string pageName = "New Page";
            var    page     = pageInterface.Create(pageName, pageTestContext.users[0]);

            var fetched = pageInterface.GetById(page.Id);

            Assert.NotNull(fetched);

            Assert.Equal(page.Id, fetched.Id);

            Assert.Equal(pageName, fetched.Name);
            Assert.Equal(fetched.Acl.ownerId, pageTestContext.users[0].Id);
        }