Don't allow form submission unless connected and core

This commit is contained in:
2020-10-09 14:41:10 +02:00
parent 4ab5c3c372
commit c0ccf83061
2 changed files with 7 additions and 1 deletions
@@ -107,6 +107,9 @@ export default class AddReimbursementComponent extends Component {
@action
submit (e) {
e.preventDefault();
if (!this.kredits.currentUser) { window.alert('You need to connect your Ethereum account first.'); return false }
if (!this.kredits.currentUserIsCore) { window.alert('Only core contributors can submit reimbursements.'); return false }
const contributor = this.contributors.findBy('id', this.contributorId);
const attributes = {