Authorization: Only allow different user roles to update different fields
For example i have a model A which has b, c, d fields. And my user can be a teacher or a student. All users can update model A but teacher can update all fields and student can only update field d. So should I create two APIs do the same job is update model A for each teacher or student. Or I just need to create only one API for both and add some if else statements to check if users have permissions to update specific fields. that they pass to body of request. Thank you.