summaryrefslogtreecommitdiff
path: root/swat
diff options
context:
space:
mode:
authorDerrell Lipman <derrell@samba.org>2006-10-06 15:38:43 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:20:39 -0500
commitde2eb8df0c1aa361adbf14a5984b1719e17f70cb (patch)
tree2315140f9efff49f705b0ee898772ea0b24df95b /swat
parentaaab47cb910fbbec6913bc5f796f0d6d479f729d (diff)
downloadsamba-de2eb8df0c1aa361adbf14a5984b1719e17f70cb.tar.gz
r19140: allow own authentication handling by jsonrpc apps
Diffstat (limited to 'swat')
-rw-r--r--swat/scripting/common.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/swat/scripting/common.js b/swat/scripting/common.js
index 299a67c7020..fe25287a74c 100644
--- a/swat/scripting/common.js
+++ b/swat/scripting/common.js
@@ -74,10 +74,18 @@ function page_footer() {
*/
function always_allowed(uri) {
var str = string_init();
+
+ /* allow jsonrpc-based applications to do their own authentication */
+ var s = str.split('/', uri);
+ if (s[0] == "" && s[1] == 'apps') {
+ return true;
+ }
+
var s = str.split('.', uri);
if (s.length < 2) {
return false;
}
+
var ext = s[s.length-1];
var allowed = new Array("ico", "gif", "png","css", "js");
for (i in allowed) {