'Creating role with full access to schema, and assign it to user

I try to create role that will be used by developers account and will be granting access to all tables under one schema. Everything looks correct, but user still don't have access that it need. Can someone point me what i'm doing wrong ?

  1. Create new role DEVELOPER_R that will contain all right

CREATE ROLE DEVELOPER_R

  1. Add role full access privileges to database

GRANT ALL PRIVILEGES ON DATABASE postgres to DEVELOPER_R;

  1. Create new schema TEST_SCHEMA

CREATE SCHEMA TEST_SCHEMA;

  1. Grant all access to TEST_SCHEMA for DEVELOPER_R role

GRANT ALL ON SCHEMA TEST_SCHEMA TO DEVELOPER_R;

GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA TEST_SCHEMA TO DEVELOPER_R;

  1. Create user with role

CREATE USER testuser PASSWORD 'password' IN GROUP DEVELOPER_R LOGIN;

  1. Select from TEST_TABLE

SELECT * FROM TEST_SCHEMA.TEST_TABLE

As result I would expect to have all rows form table but only what I got is permission denied to table : enter image description here

When I look into TEST_SCHEMA properties I can see that DEVELOPER_R have UC access there: enter image description here

And testuser is in DEVELOPER_R group.

enter image description here

Can someone point me what i missing ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source