Closed alongosz closed 5 years ago
Hi @gggeek could you please review and merge it? thanks
Hello. I am bit busy atm. If you are in a hurry I can merge this as is, and review later...
Ok, please merge. I've tested it locally on ezp-demo instance.
Ok. Not promising not to changw anything later...
We've finally dropped
Repository
authentication-related methods that were deprecated sinceezpublish-kernel
v6.6
(ezsystems/ezpublish-kernel#2764).This PR refactors the Bundle services which rely on the following
Repository
methods:getCurrentUser
,setCurrentUser
.I've chosen to keep trait-based architecture for this, but named the new trait
AuthenticatedUserSetterTrait
because how it's done is rather an implementation detail. The trait relies onPermissionResolver
.I've also slightly changed the way the login is determined from context, to use more SOLID-oriented approach, avoiding union types and complex "spaghetti" logic, delegating it to separate methods.
I'm dropping here also
RepositoryUserSetterTrait
because it makes no sense to keep code that will no longer work with ezpublish-kernel 8.0.Moreover after refactoring I saw that both
getAdminUserIdentifier
andgetAdminUserIdentifierFromContext
are no longer used, so I decided to drop them as well. However there's no harm in keeping them if really needed by BC.