I am doing a project in Flask. I am using sqlalchemy to work with database. I want to create the following roles and assign permissions to that roles as given below.
Roles : Student, Teacher, HOD, Admin
Peremissions :
- Student can only insert into and select from table1. Should not be able to update any column of table1.
- Teacher should have the permissions to insert, select, delete and update on table1.
- HOD also have similar permissions as teacher.
- By default when a user register, role of user will be 'Student'. Only admin should have the ability to change the role of a user.
How to impliment these role and permissions ? Or without assigning these permissions is ther e a way to handle this ? Can someone help ?
How to