
Users, Roles, Groups
Task 1: Create a login role report_user that can only read from the film table CREATE ROLE report_user WITH LOGIN PASSWORD 'report123'; GRANT SELECT ON film TO report_user; This creates a login user and gives only SELECT permission on film table. Task 2: report_user cannot access customer table – Fix it GRANT SELECT ON customer TO report_user; This gives read access to customer table. Task 3: Allow report_user to see only customer_id, first_name, last_name First remove full access: REVOKE SELECT ON customer FROM report_user; Then give column level access: GRANT SELECT (customer_id, first_name, last_name) ON customer TO report_user; Task 4: Create support_user who can SELECT from customer, UPDATE only email column, Cannot DELETE CREATE ROLE support_user WITH LOGIN PASSWORD 'support123'; GRANT SELECT ON customer TO support_user; GRANT UPDATE (email) ON customer TO support_user; We did not give DELETE permission, so they cannot delete. Task 5: Remove SELECT access on film from report_user
Continue reading on Dev.to Tutorial
Opens in a new tab



