Configuration

Well, there is nothing modular.... Yet.... We just say that resource book has view action which is accessible to
everyone, add to logged users and edit with delete actions to users with admin role.

There are also two default options. With the first one we say that each ->isAllowed() call on unknown action will
automatically return true. But the second default will overwrite this option for all book actions to false.

That means that eg. ->isAllowed('book', 'detail') will return false, but ->isAllowed('user', 'detail')true.

Other resources and actions

If default option is not enough, you can create default resource or default action with asterisk.

You can also return * from getActions() method to tell that the authorizator can accept any action.

Use objects as resources

In previous code you may noticed unused argument $data in isAllowed method. Imagine that you want to allow all users
to update or delete their own books. First thing you need to do, is register some kind of "translator" from objects to
resource names (lets say mappers).

authorization:
targetResources:App\Model\Book: book

Now every time you pass App\Model\Book object as resource, it will be automatically translated to book resource,
which will be then processed with your App\Model\Books service registered in previous example.

Keep in mind that actions at components or signals are presenter actions, not actions at your authorization configuration.

Now editForm component can be rendered only on edit action, favoriteButton only on default or detail actions and
readLaterButton anywhere.

Same @action annotations can be used also for signals.

Presenter security modes

By default this package will try to check action, render, handle and createComponent methods. But if you'll omit some
annotations, nothing will happen and that method will be allowed. This can be changed by turning on strict mode.