i've implemented the ReviseOperation for Backpack addon in my backpack app but I got stuck at using the revisions with permissions.
I would like the revisions to only be available to the users that have the revise-operation permission.
for the other operations i use something like:
if (!backpack_user()->can('clients_access')) {
CRUD::denyAccess('list');
}
if (!backpack_user()->can('clients_create')) {
CRUD::denyAccess('create');
}
and so on.
but how can I do the same with revisions?
in my CrduController I've added:
use \Backpack\ReviseOperation\ReviseOperation;
and in my model I've added:
use \Venturecraft\Revisionable\RevisionableTrait;
i found the answer. If anyone needs this, just add the permission "revise" and this check:
to your Crud Controller in the setup function