diff options
author | Andrew Bartlett <abartlet@samba.org> | 2007-09-10 03:44:47 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 15:05:50 -0500 |
commit | 15c1801a5c13479f1bf67e0e3c1ad7c0af8e3af7 (patch) | |
tree | c5bcb824e04cb1de4cccb07a148c113ff1831298 /services/json_auth.esp | |
parent | 37de963f67a1331b6402f901d2bda79b7119a155 (diff) | |
download | samba-15c1801a5c13479f1bf67e0e3c1ad7c0af8e3af7.tar.gz samba-15c1801a5c13479f1bf67e0e3c1ad7c0af8e3af7.tar.bz2 samba-15c1801a5c13479f1bf67e0e3c1ad7c0af8e3af7.zip |
r25051: Move SWAT back to the old-style form-submit modal.
The Web 2.0, async client tools were really interesting, but without
developer backing they remain impossible to support into a release.
The most interesting app was the LDB browser, and I intend to replace
this with phpLdapAdmin, preconfigured for Apache during provision.
This also removes the need to 'compile' SWAT on SVN checkouts.
Andrew Bartlett
(This used to be commit cda965e908055d45b1c05bc29cc791f7238d2fae)
Diffstat (limited to 'services/json_auth.esp')
-rw-r--r-- | services/json_auth.esp | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/services/json_auth.esp b/services/json_auth.esp deleted file mode 100644 index 57fbd7aaac..0000000000 --- a/services/json_auth.esp +++ /dev/null @@ -1,73 +0,0 @@ -<% -libinclude("auth.js"); - -/* Return true to allow access; false otherwise */ -function json_authenticate(serviceComponents, method, scriptTransportId, error) -{ - // Don't allow any access via ScriptTransport, for now. There are serious - // potential security exploits that will need to be protected against when - // we do want to allow use of ScriptTransport. -- djl - if (scriptTransportId != jsonrpc.Constant.ScriptTransport.NotInUse) - { - error.setError(jsonrpc.Constant.ServerError.PermissionDenied, - "Permission denied"); - return false; - } - - // Does the requested method require authentication? - if (! _authentication_required(serviceComponents, method)) - { - // Nope. Let 'em in. - return true; - } - - // Did our session expire? - if (request['SESSION_EXPIRED'] == "True") - { - // Yup. - error.setError(jsonrpc.Constant.ServerError.SessionExpired, - "Session expired"); - error.setInfo(getDomainList()); - return false; - } - - // Are we authenticated? - if (! session.AUTHENTICATED) - { - // Nope. - error.setError(jsonrpc.Constant.ServerError.NotLoggedIn, - "Not logged in"); - error.setInfo(getDomainList()); - return false; - } - - return true; -} - - -/* - * Return true if authentication is required for the specified method; - * false otherwise. - */ -function _authentication_required(serviceComponents, method) -{ - var m = join(".", serviceComponents) + "." + method; - - // See if this method requires authentication - if (m == "samba.system.login" || - m == "samba.system.logout") - { - // Nope. - return false; - } - - // Anything not listed above requires authentication - return true; -} - -/* - * Local Variables: - * mode: c - * End: - */ -%> |