Not redirecting to login page.
it is not redirecting to login page when we browse any url before login . for example: http://localhost:9899/demo/editinplace. if we will type.it is showing me that page without asking authentication details.
You must use create an anonymous role and then assign role to anonymous user. If you use admin user or any user who has admin privileges for security it bypasses all security. I will post note in readme to describe how to use application-security and configure anonymous role.
Created anonymous role and then assigned that role to anonymous user and also configured as default user in http server however it is showing me execution/security privileges errors. please let me know which roe/privileges/permissions need to assign anonymous role.
Date: Thu, 19 Apr 2012 22:32:11 -0700 From: [email protected] To: [email protected] Subject: Re: [xquerrail] Not redirecting to login page. (#4)
Created anonymous role and then assigned that role to anonymous user and also configured as default user in http server however it is showing me execution/security privileges errors. please let me know which roe/privileges/permissions need to assign anonymous role.
Reply to this email directly or view it on GitHub: https://github.com/garyvidal/xquerrail/issues/4#issuecomment-5238123
I added security privileges to anonymous role. Now it seems running however when I click on my account,showing me below error.
Error:
Code: XDMP-AS Name: err:XPTY0004 XQuery Version: 1.0-ml Message: Invalid coercion Formatted: XDMP-AS: (err:XPTY0004) $domain-model as element(domain:model) -- Invalid coercion: () as element(domain:model) Retryable: false Expression: $domain-model as element(domain:model)
Stack Output:
Module URI Line Column Operation Variables
/_framework/base/base-model.xqy 427 45 model:list((), map:map(<map:map xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:map="http://marklogic.com/xdmp/map"><map:entry key="_application"><map:value xsi:type="xs:string">ap.../map:map))
/_framework/base/base-controller.xqy 199 4 controller:list()
/_framework/base/base-controller.xqy 216 3 controller:index()
/_framework/base/base-controller.xqy 69 37 base:invoke("index")
Variables:
$action "index"
/_framework/dispatchers/dispatcher.web.xqy 123 10 dispatcher:invoke-controller()
Variables:
$application "application"
$controller "my-account.html"
$action "index"
$route "default_index"
$controller-location "/application/controller/my-account.html-controller.xqy"
$controller-uri "http://www.xquerrail-framework.com/demo/controller/my-account.ht..."
/_framework/dispatchers/dispatcher.web.xqy 211 20
Variables:
$_log ()
$init ()
$_log ()
$request map:map(<map:map xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:map="http://marklogic.com/xdmp/map"><map:entry key="request:route"><map:value xsi:type="xs:string">d.../map:map)
$request ()
$log ()
Request Variables
request:route default_index
request:header::Accept-Charset ISO-8859-1,utf-8;q=0.7,_;q=0.3
request:userid 7071164303237443533
request:action index
request:header::Referer http://localhost:9899/demo/gallery
request:url /_framework/dispatchers/dispatcher.web.xqy?_action=index&_application=application&_controller=my-account.html&_format=html&_route=default_index
request:protocol http
request:path /_framework/dispatchers/dispatcher.web.xqy
request:field::application application
foo foo
request:header::Accept-Language en-US,en;q=0.8
request:header::User-Agent Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.19 (KHTML, like Gecko) Chrome/18.0.1025.162 Safari/535.19
request:view default
request:application application
request:controller my-account.html
request:method GET
request:header::Cookie SessionID=f27dfa22e09fa668
request:format html
request:username
request:header::Connection keep-alive
request:header::Accept-Encoding gzip,deflate,sdch
request:header::Host localhost:9899
request:partial false
request:header::Accept text/html,application/xhtml+xml,application/xml;q=0.9,/*;q=0.8
Hi gary,
when i give necessary permissions to anonymous user now i can see login page.