Allow access of a group to instructor only if that instructor is in instructors list

I am working on Education module and I have to allow an instructor to only view and edit a student group if that instructor is in instructors list of that group.
How can we dynamically set permissions in these scenarios?

I have the exact same question.
To help us, could someone point out a similar cases within ERPNext. (like sale or lead, etc.). They I could check the code.

Just trying to make this post visible again.
I would really appreciate any ideas, suggestions or pointers on how to go about this?
I can’t really see any other situation where this is the case in ERPNext.

Most educatonal institutions would want that an instructor can only see the students that they are instructor for. That is do not see other students profile, log entry, etc, program enrollment if they do not teach that student.

Thanks.

Did you get what you ask for?

1 Like