1
0
Fork 0
mirror of synced 2024-07-03 21:50:34 +12:00

Disallow rows with no permissions set

This commit is contained in:
Jake Barnby 2022-08-29 15:21:42 +12:00
parent 90dae04fb7
commit 74969ed606
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -34,6 +34,10 @@
});
},
addPermission(formId, role, permissions) {
if (Object.values(permissions).every(p => p === false)) {
document.getElementById(`${formId}Input`)
.setCustomValidity('No permissions selected');
}
if (this.permissions.some(p => p.role === role)) {
document.getElementById(`${formId}Input`)
.setCustomValidity('Role entry already exists');