Exercise 14.03 – using roles to manage permissions
The company keeps growing, and there has been another set of new hires:
- Linda: Taking over HR responsibilities from Patrick
- John: Will be taking care of finance
- Vladimir: The mobile app developer
- Victoria: The designer for the website
You have been asked to start using the following roles: manager
, webdeveloper
, and appdeveloper
.
Here, you will connect to the database, create three roles, and grant permissions to them. Following this, you will create accounts for the new hires, and then grant roles to the existing people. To implement this exercise, follow these steps:
- Connect to the database.
- Create three roles:
manager
,webdeveloper
, andappdeveloper
. Grant permissions to them:CREATE ROLE 'manager'; GRANT ALL ON employees.* TO 'manager'; CREATE ROLE 'webdeveloper'; GRANT ALL ON ebike.* TO 'webdeveloper'; CREATE ROLE 'appdeveloper';...