Skip to content
This repository has been archived by the owner on Nov 9, 2022. It is now read-only.

Self-testing bootstrap fails on creating scheduled-tasks #207

Closed
grtjn opened this issue Apr 17, 2014 · 2 comments
Closed

Self-testing bootstrap fails on creating scheduled-tasks #207

grtjn opened this issue Apr 17, 2014 · 2 comments

Comments

@grtjn
Copy link
Contributor

grtjn commented Apr 17, 2014

Running through current eval endpoint seems to either hide this issue, or it simply doesn't occur that way. But if I make execute_query use xcc_query, it starts complaining that create-scheduled-tasks fails at the xdmp:user calls in there. I added following function, and used that instead. That solved the issue:

declare function setup:get-user-id($user-name as xs:string) as xs:unsignedLong? {
  xdmp:eval(
    'import module namespace sec="http://marklogic.com/xdmp/security" at "/MarkLogic/security.xqy";
     declare variable $user-name as xs:string external;
     /sec:user[sec:user-name = $user-name]/sec:user-id',
     (xs:QName("user-name"), $user-name),
     <options xmlns="xdmp:eval">
       <database>{$default-security}</database>
     </options>)
};
@grtjn
Copy link
Contributor Author

grtjn commented Apr 23, 2014

Available on grtjn/roxy dev branch

@paxtonhare
Copy link
Contributor

fixed in dev

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants