-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from mdouchin/grant-write-access-to-postgresql…
…-group Installation - Grant write access to the pgrouting schema tables to a given PostgreSQL user group
- Loading branch information
Showing
9 changed files
with
74 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- Grant | ||
GRANT USAGE ON SCHEMA "pgrouting" TO "{$userGroup}"; | ||
GRANT ALL ON ALL TABLES IN SCHEMA "pgrouting" TO "{$userGroup}"; | ||
GRANT USAGE ON ALL SEQUENCES IN SCHEMA "pgrouting" TO "{$userGroup}"; | ||
GRANT EXECUTE ON ALL FUNCTIONS IN SCHEMA "pgrouting" TO "{$userGroup}"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
query.ext.bad=Extension error, postgis or pgrouting is missing | ||
query.grant.bad=Grant access on the schema pgrouting to the given group failed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
query.ext.bad=Erreur d'extension, il manque postgis ou pgrouting | ||
query.grant.bad=Erreur lors de la configuration des droits d'accès sur le schéma pgrouting |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[modules] | ||
pgrouting.access=2 | ||
pgrouting.installparam="srid=2154" | ||
pgrouting.installparam="srid=2154;postgresql_user_group=gis_group" | ||
|
||
[jResponseHtml] | ||
plugins = debugbar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
#!/bin/bash | ||
|
||
# Create user lizmap which will create and own the pgrouting database & schema | ||
psql --username postgres --no-password <<-EOSQL | ||
CREATE ROLE lizmap WITH LOGIN CREATEDB PASSWORD 'lizmap1234!'; | ||
CREATE DATABASE lizmap WITH OWNER lizmap; | ||
EOSQL | ||
|
||
# Create extensions postgis & pgrouting | ||
psql --username postgres --no-password -d lizmap <<-EOSQL | ||
CREATE EXTENSION IF NOT EXISTS postgis SCHEMA public; | ||
CREATE EXTENSION IF NOT EXISTS pgrouting SCHEMA public; | ||
EOSQL | ||
|
||
# Create another test user and group which must be able to read & write | ||
# data inside the pgrouting schema | ||
psql --username postgres --no-password <<-EOSQL | ||
CREATE ROLE "gis_user" WITH LOGIN CREATEDB PASSWORD 'lizmap1234!'; | ||
CREATE ROLE "gis_group"; | ||
GRANT "gis_group" TO "gis_user"; | ||
GRANT CONNECT ON DATABASE "lizmap" TO "gis_user"; | ||
EOSQL |