diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-07 21:40:05 -0700 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-10-07 21:40:05 -0700 |
| commit | 03d0311618267cf0b16445161c4d275749d64a5e (patch) | |
| tree | a4143bcca595e8724e5fd516d17f8b26daa1ee4e /modules/gallery/libraries | |
| parent | b3211cb2a8282556d410c91771baeb764d47ed10 (diff) | |
Implement a user::is_writable() API method and disable the user add, updates and display if the Identity driver does not support writes. This is set in the config.identity.php
Diffstat (limited to 'modules/gallery/libraries')
| -rw-r--r-- | modules/gallery/libraries/Identity.php | 11 | ||||
| -rw-r--r-- | modules/gallery/libraries/drivers/Identity.php | 1 |
2 files changed, 11 insertions, 1 deletions
diff --git a/modules/gallery/libraries/Identity.php b/modules/gallery/libraries/Identity.php index a24e6226..fec822db 100644 --- a/modules/gallery/libraries/Identity.php +++ b/modules/gallery/libraries/Identity.php @@ -93,6 +93,17 @@ class Identity_Core { } /** + * Determine if a feature is supported by the driver. + * + * @param string $feature the name of the feature to check + * @return boolean true if supported + */ + public function is_writable() { + return !empty($this->config["allow_updates"]); + } + + + /** * Return the guest user. * * @todo consider caching diff --git a/modules/gallery/libraries/drivers/Identity.php b/modules/gallery/libraries/drivers/Identity.php index e67547be..a92958c7 100644 --- a/modules/gallery/libraries/drivers/Identity.php +++ b/modules/gallery/libraries/drivers/Identity.php @@ -176,7 +176,6 @@ abstract class User_Definition { case "hash": case "url": case "locale": - Kohana::log("error", "__set($column, $value)"); $this->user->$column = $value; break; default: |
