Skip to content

Commit

Permalink
[bugfix] Create 'exsaml' user during package install
Browse files Browse the repository at this point in the history
  • Loading branch information
adamretter committed Aug 25, 2023
1 parent 7a06c68 commit cb78fef
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main/xar-resources/pre-install.xq
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
xquery version "3.1";

import module namespace sm = "http://exist-db.org/xquery/securitymanager";

declare variable $saml-user-name := "exsaml";

(: Create the default 'exsaml' user account :)
if (fn:not(sm:user-exists($saml-user-name)))
then
sm:create-account($saml-user-name, $saml-user-name, (), "existdb-saml", "existdb-saml-xquery SAML Authentication Account")
else()
1 change: 1 addition & 0 deletions xar-assembly.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

<target>${package-abbrev}</target>

<prepare>pre-install.xq</prepare>
<finish>post-install.xq</finish>

<!-- includes everything in target, README.md, and LICENSE -->
Expand Down

0 comments on commit cb78fef

Please sign in to comment.