Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init() {
this.projectReady = Formio.makeStaticRequest(this.appConfig.appUrl).then(
(project: any) => {
each(project.access, (access: any) => {
this.formAccess[access.type] = access.roles;
});
},
(): any => {
this.formAccess = {};
return null;
}
);
// Get the access for this project.
this.accessReady = Formio.makeStaticRequest(
this.appConfig.appUrl + '/access'
).then(
(access: any) => {
each(access.forms, (form: any) => {
this.submissionAccess[form.name] = {};
form.submissionAccess.forEach((subAccess: any) => {
this.submissionAccess[form.name][subAccess.type] = subAccess.roles;
});
});
this.roles = access.roles;
return access;
},
(): any => {
this.roles = {};
return null;
}
init() {
this.projectReady = Formio.makeStaticRequest(this.appConfig.appUrl).then(
(project: any) => {
each(project.access, (access: any) => {
this.formAccess[access.type] = access.roles;
});
},
(): any => {
this.formAccess = {};
return null;
}
);
// Get the access for this project.
this.accessReady = Formio.makeStaticRequest(
this.appConfig.appUrl + '/access'
).then(
(access: any) => {