[dev] Customising Auth::isAdmin()

Chuck Hagenbuch chuck at horde.org
Wed Aug 27 05:30:11 PDT 2003


Quoting Vijay Mahrra <vijay.mahrra at es.easynet.net>:

> My reasoning was that this way of extending capabilities doesn't require
> having to alter the capabilities array in any other drivers or the parent
> class.

Neither does the current way.

> Calling empty($this->capabilities[$capability])
> assumes that $capability actually exists as a key in the $this->capabilities
> array.

No, it doesn't.

> I was thinking that if a programmer extended the capabilities in a
> custom driver, for example added the 'isadmin' capability I suggested, and
> 'isadmin' isn't listed in Auth.php's isAdmin() capabilities array an error
> could occur (because the array key doesn't exist).

Nope.

-chuck

--
Charles Hagenbuch, <chuck at horde.org>
They're just looking at a wall of meat.


More information about the dev mailing list