/** * Removes a policy from a role. * * @param mixed $policyId */ public function deletePolicy($policyId) { // Each policy can only be associated to exactly one role. Thus it is // sufficient to use the policyId for identification and just remove // the policy completely. $this->roleGateway->removePolicy($policyId); }
/** * Removes a policy from a role. * * @param mixed $policyId * @param int $status One of Role::STATUS_DEFINED|Role::STATUS_DRAFT */ public function removePolicy($policyId, $status = Role::STATUS_DEFINED) { try { return $this->innerGateway->removePolicy($policyId, $status); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }
/** * Removes a policy from a role. * * @param mixed $policyId */ public function removePolicy($policyId) { try { return $this->innerGateway->removePolicy($policyId); } catch (DBALException $e) { throw new RuntimeException('Database error', 0, $e); } catch (PDOException $e) { throw new RuntimeException('Database error', 0, $e); } }