// What are the projects under this authority?
$.post("/rest/myslice:authority/",{'fields':['authority_hrn'],'filters':{'authority_hrn':'CONTAINS'+auth}}, function( data ) {
$.each(data, function(idx, project) {
- console.log(project.authority_hrn);
if($.inArray(project.authority_hrn,projects) == -1){
projects.push(project.authority_hrn);
}
if(this.checked){
var record_id = this.id;
pi_users.push(record_id)
+ $.post("/credentials/clear/",{'emails':[this.dataset['email']]}, function(data) {
+ }); // post credentials clear
flag = true;
}
});
for (var i=pi_users.length-1; i>=0; i--) {
if (pi_users[i] === record_id) {
pi_users.splice(i, 1);
+ $.post("/credentials/clear/",{'emails':[this.dataset['email']]}, function(data) {
+ }); // post credentials clear
+ flag = true;
}
}
- flag = true;
}
});
if(flag == true){
//alert("Rest Error for "+record_id+": "+data.error);
}
});
+ }else{
+ mysliceAlert('No action: User had no rights on: {{user_details.parent_authority}}','success', true);
}
});
});