Closed basz closed 8 years ago
/cc @prolic
LGFM :+1:
I don't see a use-case. Can someone explain it to me?
public function assert($permission, IdentityInterface $identity = null, $context = null): bool {
if ((string) $identity->getUserId() === (string) $context->userId()) {
return true;
}
return $this->authorizationService->isGranted($identity, sprint("%s.forOthers", $permission, $context));
}
ok, good for me then! :+1:
rebased
As proposed this PR passes the requested permission name to the Assertion::assert method, so the assertion can assert based on that information.
Note: based on an PR #342 that is also a proposal. To avoid merge conflicts please review/merge that one first.