From b274c28d035e7efd5af1750ff0e23d4a178bd4a5 Mon Sep 17 00:00:00 2001 From: John Bintz Date: Wed, 14 Oct 2009 20:49:31 -0400 Subject: [PATCH] working on per-user permissions --- classes/WhatDidTheySayAdmin.inc | 2 ++ classes/partials/_capabilities.inc | 37 ++++++++++++++++++++++++++++++ test/WhatDidTheySayAdminTest.php | 4 ---- what-did-they-say.pot | 4 ++-- 4 files changed, 41 insertions(+), 6 deletions(-) diff --git a/classes/WhatDidTheySayAdmin.inc b/classes/WhatDidTheySayAdmin.inc index fbd2857..40f8c53 100644 --- a/classes/WhatDidTheySayAdmin.inc +++ b/classes/WhatDidTheySayAdmin.inc @@ -908,6 +908,8 @@ class WhatDidTheySayAdmin { $available_filters = $this->_get_available_override_filters(); $suggested_amount = 20 + ($this->transcript_count * 0.1); + $users = $wpdb->get_results("SELECT ID, user_login from $wpdb->users ORDER BY user_login"); + include('partials/admin.inc'); } diff --git a/classes/partials/_capabilities.inc b/classes/partials/_capabilities.inc index a19161c..16f1e77 100644 --- a/classes/partials/_capabilities.inc +++ b/classes/partials/_capabilities.inc @@ -29,5 +29,42 @@ + +

+ +

+ +
+ + + + + + + + ID, 'transcript_capabilities'); + if (!is_array($user_capabilities)) { $user_capabilities = array(); } + ?> + + + capabilities as $key => $label) { ?> + + + + + + + + +
LoginCapabilities
user_login ?> + +
  + +
+
diff --git a/test/WhatDidTheySayAdminTest.php b/test/WhatDidTheySayAdminTest.php index 345722a..acf4490 100644 --- a/test/WhatDidTheySayAdminTest.php +++ b/test/WhatDidTheySayAdminTest.php @@ -61,10 +61,6 @@ class WhatDidTheySayAdminTest extends PHPUnit_Framework_TestCase { 'change_languages' => 'reader' ), $result['capabilities']); } - - function testHandleUpdateLanguages() { - $this->markTestIncomplete(); - } } ?> \ No newline at end of file diff --git a/what-did-they-say.pot b/what-did-they-say.pot index 78e5c33..c682d68 100644 --- a/what-did-they-say.pot +++ b/what-did-they-say.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: what-did-they-say 0.9.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-10-14 07:54-0400\n" +"POT-Creation-Date: 2009-10-14 08:16-0400\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -16,7 +16,7 @@ msgstr "" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" -#: what-did-they-say.php:207 +#: what-did-they-say.php:217 msgid "Edit/Add Transcripts" msgstr ""