Created
November 11, 2013 20:12
-
-
Save kaiohken1982/7419560 to your computer and use it in GitHub Desktop.
Zend Framework 1 Acl implementation #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class My_Acl_Assert_CleanIPAssertion implements Zend_Acl_Assert_Interface | |
{ | |
public function assert(Zend_Acl $acl, Zend_Acl_Role_Interface $role = null, | |
Zend_Acl_Resource_Interface $resource = null, $privilege = null) | |
{ | |
return $this->_isCleanIP($_SERVER['REMOTE_ADDR']); | |
} | |
protected function _isCleanIP($ip) | |
{ | |
// check if the remote ip is not on a blacklist, must return a boolean | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment