public Page Get(string pageId, User subject) { if (!membershipInterface.IsReader(pageId, subject)) { throw new NotAuthorized(); } return(pageInterface.GetById(pageId)); }
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); }