ZF-Commons / zfc-rbac

Role-based access control module to provide additional features on top of Zend\Permissions\Rbac
BSD 3-Clause "New" or "Revised" License
181 stars 111 forks source link

Added config option for authorization service instead of hard-coded one #395

Open svycka opened 4 years ago

svycka commented 4 years ago

There are problems with migration to laminas I can't change Zend\Authentication\AuthenticationService to Laminas\Authentication\AuthenticationService then I add an alias in service manager for this but in some cases, I can't use this workaround and would be nice if this would be not hardcoded. now you can just add to config this

'zfc_rbac' => [
  'authentication_service' => 'Laminas\Authentication\AuthenticationService' // or 'zfcuser_auth_service' in case of zfcUser
];

This is not a BC break because default still is Zend\Authentication\AuthenticationService

coveralls commented 4 years ago

Coverage Status

Coverage increased (+0.5%) to 93.443% when pulling a103d30b1731f1a57c044ae4b7417817849fa0e5 on svycka:hardcoded-authorization-service into 8a28d65df63d9991cbef24eaf219061b6c2890ed on ZF-Commons:master.

prolic commented 4 years ago

we probably should migrate to laminas and get rid of zend* deps. @basz, thoughts?

svycka commented 4 years ago

@prolic even if you migrate, this would still be useful don't you think? Anyway, having this hardcoded was bad idea in the first place.

basz commented 4 years ago

I agree with @svycka . this should be merged regardless of the state of #392 or #393