Author: bshaffer
Date: 2010-02-01 04:02:30 +0100 (Mon, 01 Feb 2010)
New Revision: 27377
Modified:
plugins/csSettingsPlugin/trunk/config/app.yml
plugins/csSettingsPlugin/trunk/lib/BasecsSettings.class.php
Log:
adding authCredential setting to allow use of credentials instead of authMethod
for editing comments
Modified: plugins/csSettingsPlugin/trunk/config/app.yml
===================================================================
--- plugins/csSettingsPlugin/trunk/config/app.yml 2010-02-01 02:53:05 UTC
(rev 27376)
+++ plugins/csSettingsPlugin/trunk/config/app.yml 2010-02-01 03:02:30 UTC
(rev 27377)
@@ -10,8 +10,10 @@
model: Database Model
upload: Upload
- authMethod: isSuperAdmin #used to determine when user is able to
edit settings
+ authMethod: isSuperAdmin #used to determine if user is able to
edit settings
+ authCredential: admin #used to determine if user is able to edit
settings
+
cachepaths: #override the cache path, for whatever
reason you might want to
settings_array: cs_settings.settings_array.cache
object_array: cs_settings.obj_array.cache
\ No newline at end of file
Modified: plugins/csSettingsPlugin/trunk/lib/BasecsSettings.class.php
===================================================================
--- plugins/csSettingsPlugin/trunk/lib/BasecsSettings.class.php 2010-02-01
02:53:05 UTC (rev 27376)
+++ plugins/csSettingsPlugin/trunk/lib/BasecsSettings.class.php 2010-02-01
03:02:30 UTC (rev 27377)
@@ -24,8 +24,19 @@
}
$authMethod = sfConfig::get('app_csSettingsPlugin_authMethod');
+ $authCredential = sfConfig::get('app_csSettingsPlugin_authCredential');
- return $user->$authMethod();
+ $hasAccess = false;
+ if ($authMethod)
+ {
+ $hasAccess = $user->$authMethod();
+ }
+ if (!$hasAccess && $authCredential)
+ {
+ $hasAccess = $user->hasCredential($authCredential);
+ }
+
+ return $hasAccess;
}
/**
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.