summaryrefslogtreecommitdiff
path: root/modules/gallery/libraries
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-10-07 21:40:05 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-10-07 21:40:05 -0700
commit03d0311618267cf0b16445161c4d275749d64a5e (patch)
treea4143bcca595e8724e5fd516d17f8b26daa1ee4e /modules/gallery/libraries
parentb3211cb2a8282556d410c91771baeb764d47ed10 (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.php11
-rw-r--r--modules/gallery/libraries/drivers/Identity.php1
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: