Policy

declaration
 Policy 

const Policy = Sup => class extends Sup {

canCreate

method
 canCreate() 

Return false if can't create

canCreate(ctx, object) {
	return Promise.resolve(this);
}

canUpdate

method
 canUpdate() 

Return false if can't update

canUpdate(ctx, object) {
	return Promise.resolve(this);
}

canGet

method
 canGet() 

Return false if can't get

canGet(ctx, object) {
	return Promise.resolve(this);
}

canDelete

method
 canDelete() 

Return false if can't delete

canDelete(ctx, object) {
	return Promise.resolve(this);
}
}

module.exports = Policy;