2.0.0
Improvements
After 5 years it is time for an upgrade: A shiny new major with shiny new features.
INI files
acl.ini
is now auth_acl.ini
, to be in sync with auth_allow.ini
.
You can use Configure to keep old names if you want to (or need it for BC).
Cool new Quick setups
TinyAuth, to really live up to its name, offers a few new quick setups.
Allow non-prefixed actions to be public
If you have non-prefixed controllers that you want to make public and keep prefixed ones protected:
'allowNonPrefixed' => true,
Prefix based allow
If you want to allow certain prefixes on top, you can use:
'allowPrefixes' => [
'my_prefix',
'nested/prefix',
],
External data integration
With this version a new AllowAdapterInterface has been added to complete an API for other libraries to provide data:
- AllowAdapterInterface
- AclAdapterInterface for RBAC
Both able to be used to connect this plugin to other libraries for providing allow/ACL input.
It continues to default to the internal INI adapters.
If other adapters - e.g. reading from DB - are used, it will still cache those internally to provide the same general speed it does with internal adapters.
One DB integration is now available as TinyAuthBackend plugin.
Plugin support
Support for the new Authentication and Authorization plugins has been added.
A RequestPolicy is now provided to connect the TinyAuth ACL input to request based authorization using this new plugin.
If you plan on using the new plugins, you must not use Auth
component anymore. They can't be mixed.
Cache busting
Cache can now be cleared from code side for each auth type.
Available roles
There is now a convenience class TinyAuth in Utility namespace to quickly retrieve currently available roles.
Upgrade Infos
With this release a few small BC breaks will have to be covered with configuration (if you didn't so before):
- file is now aclFile/allowFile
- filePath is now aclFilePath/allowFilePath
- allowUser is now allowLoggedIn (former key still works, but emits deprecation warning)
- adminPrefix is now protectedPrefix (former key still works, but emits deprecation warning)
_authUser
data is now only handed down to the view layer from AuthUser component, not Auth anymore.