1
사용자/프로젝트에 대한 새 프로젝트 권한을 만들려고하지만 "유효한 프로젝트가 없습니다"때문에 저장이 실패합니다. 네트워크 로그를 보면 서버 호출의 RequestPayload가 비어 있습니다 ({ "ProjectPermission": {}}). 어떤 아이디어?권한을 저장할 수 없습니다.
_addViewPermission: function() {
this.getModel().then({
success: this.createPP,
scope: this
}).then({
success: this.readPP,
scope: this
}).then({
success: function(result) {
console.log('success', result);
},
failure: function(error) {
console.log('oh noes!', error);
}
});
},
getModel: function() {
return Rally.data.ModelFactory.getModel({
type: 'ProjectPermission'
});
},
createPP: function(model) {
var permission = Ext.create(model, {
Project: "/project/51063976712",
Role: 'Viewer',
User: "/user/43049588391"
});
return permission.save();
},
readPP: function(permission){
console.log(permisson);
return permission.self.load(permission.getId(), {
fetch: ['Project', 'User', 'Role']
});
}
팁 주셔서 감사합니다. 내 검색에서 그걸 발견하지 못했습니다. 퍼미션 객체가 생성되기 전에 라인을 삽입하고 페이로드에서 데이터를보기 시작합니다. –