/** * Returns the privileges a specific role has for the given joinpoint * * @param \F3\FLOW3\Security\ACL\Role $role The role for which the privileges should be returned * @param \F3\FLOW3\AOP\JoinPointInterface $joinPoint The joinpoint for which the privileges should be returned * @param string $privilegeType If set we check only for this type of privilege * @return array Array of privileges * @author Andreas Förthner <*****@*****.**> */ public function getPrivilegesForJoinPoint(\F3\FLOW3\Security\ACL\Role $role, \F3\FLOW3\AOP\JoinPointInterface $joinPoint, $privilegeType = '') { $methodIdentifier = $joinPoint->getClassName() . '->' . $joinPoint->getMethodName(); if (!isset($this->acls[$methodIdentifier])) { throw new \F3\FLOW3\Security\Exception\NoEntryInPolicyException('The given joinpoint was not found in the policy cache. Most likely you have to recreate the AOP proxy classes.', 1222100851); } $privileges = $this->parsePrivileges($methodIdentifier, (string) $role, $privilegeType); if (!is_array($privileges)) { return array(); } return $privileges; }
/** * Passes the signal over to the Dispatcher * * @afterreturning methodTaggedWith(signal) * @param F3\FLOW3\AOP\JoinPointInterface $joinPoint The current join point * @return void * @author Robert Lemke <*****@*****.**> */ public function forwardSignalToDispatcher(\F3\FLOW3\AOP\JoinPointInterface $joinPoint) { $this->dispatcher->dispatch($joinPoint->getClassName(), $joinPoint->getMethodName(), $joinPoint->getMethodArguments()); }