PHP Class Phergie_Plugin_Acl, phergie

Configuration settings: acl.whitelist - mapping of user hostmask patterns (optionally by host) to plugins and methods where those plugins and methods will only be accessible to those users (i.e. and inaccessible to other users) acl.blacklist - mapping of user hostmasks (optionally by host) to plugins and methods where where those plugins and methods will be inaccessible to those users but accessible to other users acl.ops - TRUE to automatically give access to whitelisted plugins and methods to users with ops for events they initiate in channels where they have ops The whitelist and blacklist settings are formatted like so: 'acl.whitelist' => array( 'hostname1' => array( 'pattern1' => array( 'plugins' => array( 'ShortPluginName' ), 'methods' => array( 'methodName' ) ), ) ), The hostname array dimension is optional; if not used, rules will be applied across all connections. The pattern is a user hostmask pattern where asterisks (*) are used for wildcards. Plugins and methods do not need to be set to empty arrays if they are not used; simply exclude them.
Author: Phergie Development Team ([email protected])
Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie

Méthodes publiques

Méthode Description
onLoad ( ) : void Checks for permission settings and removes the plugin if none are set.
postDispatch ( ) : void Clears filters on the plugin handler iterator.
preEvent ( ) : void Checks permission settings and short-circuits event processing for blacklisted users.

Méthodes protégées

Méthode Description
applyRules ( Phergie_Plugin_Iterator $iterator, array $rules ) : void Applies a set of rules to a plugin handler iterator.

Method Details

applyRules() protected méthode

Applies a set of rules to a plugin handler iterator.
protected applyRules ( Phergie_Plugin_Iterator $iterator, array $rules ) : void
$iterator Phergie_Plugin_Iterator Iterator to receive rules
$rules array Associate array containing either a 'plugins' key pointing to an array containing plugin short names to filter, a 'methods' key pointing to an array containing method names to filter, or both
Résultat void

onLoad() public méthode

Checks for permission settings and removes the plugin if none are set.
public onLoad ( ) : void
Résultat void

postDispatch() public méthode

Clears filters on the plugin handler iterator.
public postDispatch ( ) : void
Résultat void

preEvent() public méthode

Checks permission settings and short-circuits event processing for blacklisted users.
public preEvent ( ) : void
Résultat void