Allow Users to View or Edit Schema data in iShare v2.0
Allow Users to view the data in iShare
Granting [schema]_viewer to ishare_reader will allow isharedata_gis/maps and isharewebservice_gis/maps users, and any user that is a member of ishare_reader, read access to the schema e.g.
GRANT my_new_schema_viewer TO ishare_reader
Grant Users Permission to Edit GIS Layers in iShare
If a user needs to be able to edit data in a schema (iShare GIS Standard Layer) in the SDW using iShare GIS then the SDW Administrator needs to create a new schema for the Layer and grant user permissions to the isharewebservice_GIS and editor roles.
Granting [schema]_editor to ishare_webservice_gis means that any user, that is a member of isharewebservice_gis, will be able to edit data in the schema. isharewebservice_gis is the iShare user that will be doing the editing.
Sample session for SDW Administrator (iShareData user) to grant permission:
GRANT mytest_editor to isharewebservice_gis;
GRANT mytest_owner to editor;
Apply permissions to all schemas
If you wish to apply these permissions to all schemas in the SDW you can generate the commands using the following SQL. Save to a file and run in a pgAdmin query window or via psql.exe.
SELECT ('GRANT ' || schema_name || '_editor to isharewebservice_gis; GRANT ' || schema_name || '_owner to editor;') as commands FROM information_schema.schemata where schema_owner like '%owner' order by schema_name