loggedInUserScenarioWithRole("When calling GET on","GET","/api/folders/uid/permissions","/api/folders/:uid/permissions",m.ROLE_EDITOR,func(sc*scenarioContext){
callGetFolderPermissions(sc)
So(sc.resp.Code,ShouldEqual,404)
})
cmd:=dtos.UpdateDashboardAclCommand{
Items:[]dtos.DashboardAclUpdateItem{
{UserId:1000,Permission:m.PERMISSION_ADMIN},
},
}
updateFolderPermissionScenario("When calling POST on","/api/folders/uid/permissions","/api/folders/:uid/permissions",cmd,func(sc*scenarioContext){
callUpdateFolderPermissions(sc)
So(sc.resp.Code,ShouldEqual,404)
})
Reset(func(){
dashboards.NewFolderService=origNewFolderService
})
})
Convey("Given user has no admin permissions",func(){
loggedInUserScenarioWithRole("When calling GET on","GET","/api/folders/uid/permissions","/api/folders/:uid/permissions",m.ROLE_ADMIN,func(sc*scenarioContext){