From 173c4d974a008eb997a951a60207a38ab201a2f6 Mon Sep 17 00:00:00 2001 From: Ben Klang Date: Mon, 31 Oct 2005 12:35:22 +0000 Subject: [PATCH] Added external API for permissions and possible future functionality git-svn-id: https://svn.alkaloid.net/gpl/shout/trunk@77 06cd67b6-e706-0410-b29e-9de616bca6e9 --- lib/api.php | 54 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ lib/defines.php | 21 +++++++++++++++++++++ 2 files changed, 75 insertions(+) create mode 100644 lib/api.php create mode 100644 lib/defines.php diff --git a/lib/api.php b/lib/api.php new file mode 100644 index 000000000..c7b6910a5 --- /dev/null +++ b/lib/api.php @@ -0,0 +1,54 @@ + array(), + 'type' => '{urn:horde}stringArray' +); + +$_services['getUsersByDomain'] = array( + 'args' => array('domain' => 'string', 'timestamp' => 'int'), + 'type' => '{urn:horde}stringArray', +); + +function _shout_perms() +{ + static $perms = array(); + if (!empty($perms)) { + return $perms; + } + + @define('SHOUT_BASE', dirname(__FILE__) . '/..'); + require_once SHOUT_BASE . '/lib/base.php'; + + $perms['tree']['shout']['superadmin'] = false; + $perms['title']['shout:superadmin'] = _("Super Administrator"); + + $contexts= $shout->getContexts(); + + $perms['tree']['shout']['contexts'] = false; + $perms['title']['shout:contexts'] = _("Contexts"); + + // Run through every contact source. + foreach ($contexts as $context => $contextInfo) { + $perms['tree']['shout']['contexts'][$context] = false; + $perms['title']['shout:contexts:' . $context] = $context; + } + + +// function _shout_getContexts($searchfilters = SHOUT_CONTEXT_ALL, +// $filterperms = null) + + +} \ No newline at end of file diff --git a/lib/defines.php b/lib/defines.php new file mode 100644 index 000000000..eda88349f --- /dev/null +++ b/lib/defines.php @@ -0,0 +1,21 @@ +