loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions/1","/api/dashboards/id/:dashboardId/versions/:id",role,func(sc*scenarioContext){
CallGetDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,403)
})
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions","/api/dashboards/id/:dashboardId/versions",role,func(sc*scenarioContext){
CallGetDashboardVersions(sc)
So(sc.resp.Code,ShouldEqual,403)
})
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions/1","/api/dashboards/id/:dashboardId/versions/:id",role,func(sc*scenarioContext){
CallGetDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,403)
})
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions","/api/dashboards/id/:dashboardId/versions",role,func(sc*scenarioContext){
CallGetDashboardVersions(sc)
So(sc.resp.Code,ShouldEqual,403)
})
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions/1","/api/dashboards/id/:dashboardId/versions/:id",role,func(sc*scenarioContext){
CallGetDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,200)
})
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions","/api/dashboards/id/:dashboardId/versions",role,func(sc*scenarioContext){
CallGetDashboardVersions(sc)
So(sc.resp.Code,ShouldEqual,200)
})
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions/1","/api/dashboards/id/:dashboardId/versions/:id",role,func(sc*scenarioContext){
CallGetDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,403)
})
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions","/api/dashboards/id/:dashboardId/versions",role,func(sc*scenarioContext){
CallGetDashboardVersions(sc)
So(sc.resp.Code,ShouldEqual,403)
})
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions/1","/api/dashboards/id/:dashboardId/versions/:id",role,func(sc*scenarioContext){
CallGetDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,403)
})
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions","/api/dashboards/id/:dashboardId/versions",role,func(sc*scenarioContext){
CallGetDashboardVersions(sc)
So(sc.resp.Code,ShouldEqual,403)
})
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions/1","/api/dashboards/id/:dashboardId/versions/:id",role,func(sc*scenarioContext){
CallGetDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,200)
})
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions","/api/dashboards/id/:dashboardId/versions",role,func(sc*scenarioContext){
CallGetDashboardVersions(sc)
So(sc.resp.Code,ShouldEqual,200)
})
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions/1","/api/dashboards/id/:dashboardId/versions/:id",role,func(sc*scenarioContext){
CallGetDashboardVersion(sc)
So(sc.resp.Code,ShouldEqual,403)
})
loggedInUserScenarioWithRole("When calling GET on","GET","/api/dashboards/id/2/versions","/api/dashboards/id/:dashboardId/versions",role,func(sc*scenarioContext){
CallGetDashboardVersions(sc)
So(sc.resp.Code,ShouldEqual,403)
})
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){
postDashboardScenario("When calling POST on","/api/dashboards","/api/dashboards",role,cmd,func(sc*scenarioContext){