Skip to content

Commit

Permalink
Create geoserver testing user and role
Browse files Browse the repository at this point in the history
  • Loading branch information
jirik committed Jul 23, 2018
1 parent 82b4af5 commit 77be714
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ LAYMAN_PG_PASSWORD=docker
LAYMAN_GS_HOST=geoserver
LAYMAN_GS_PORT=8080
LAYMAN_GS_PATH=/geoserver/
LAYMAN_GS_USER=layman
LAYMAN_GS_USER=layman_test
LAYMAN_GS_PASSWORD=laymanpwd
LAYMAN_GS_ROLE=LAYMAN_ROLE
LAYMAN_GS_ROLE=LAYMAN_TEST_ROLE

# used in dev and test only
GS_VERSION=2.13.0
Expand Down
5 changes: 5 additions & 0 deletions sample/geoserver_data/security/role/default/roles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<role id="ADMIN"/>
<role id="GROUP_ADMIN"/>
<role id="LAYMAN_ROLE"/>
<role id="LAYMAN_TEST_ROLE"/>
</roleList>
<userList>
<userRoles username="admin">
Expand All @@ -13,6 +14,10 @@
<roleRef roleID="ADMIN"/>
<roleRef roleID="LAYMAN_ROLE"/>
</userRoles>
<userRoles username="layman_test">
<roleRef roleID="ADMIN"/>
<roleRef roleID="LAYMAN_TEST_ROLE"/>
</userRoles>
</userList>
<groupList/>
</roleRegistry>
1 change: 1 addition & 0 deletions sample/geoserver_data/security/usergroup/default/users.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<users>
<user enabled="true" name="admin" password="digest1:D9miJH/hVgfxZJscMafEtbtliG0ROxhLfsznyWfG38X2pda2JOSV4POi55PQI4tw"/>
<user enabled="true" name="layman" password="plain:laymanpwd"/>
<user enabled="true" name="layman_test" password="plain:laymanpwd"/>
</users>
<groups/>
</userRegistry>
2 changes: 1 addition & 1 deletion src/layman/layman.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ def upload_file():
"enabled": True,
"store": {
"@class": "dataStore",
"name": "browser:postgresql",
"name": username+":postgresql",
},
}
}
Expand Down

0 comments on commit 77be714

Please sign in to comment.