How to grant edit access for specific nodes to 1 or more selected users? I am building a school site on Drupal 8.  Among others, I have two content types, one for teachers, one for courses.  Teachers also have user accounts and belong to a role, say 'teacher'. 

I want teachers (authenticated site users who belong to the 'teacher' role) to be able to edit the pages of the courses they teach.  The problem is, there are courses which are being taught by more than one teacher, hence I can't solve this simply by enabling 'edit own content' and have them as owners.  

So all in all, I want to give 'edit access' for specific nodes, to specific, sometimes multiple, users. 

I researched before asking this fairly simple question. 

There is a very similar question here - however its four years old, and the node access module which is suggested as a solution is not usable for Drupal 8 yet. 

There is a mention of another module, flexi access, but that is only available for Drupal 7. 

There is also a link to ACL, "an API for other modules to create lists of users and give them access to nodes", but that in itself is only in pre-release for Drupal 8, and a module which seems to be using it, Content Access has open security issues (and also is in pre-release status). 

Searching around, I also found Permissions by Term module, seems stable and very well documented, however I didn't find it very intuitive to be honest, and also it seems to cater basically for restricting view access to nodes (as suggested here, but also from its video tutorial).  

I want something simpler.  And I obviously want all nodes to still be publicly viewable by anyone (even anonymous users, of course).  So although Permissions by Term seemed a possible choice, I don't know if I can/should use it. 

There is also the Group module which is frequently referenced, but that also seems an overkill and way too complicated for the simple task I want to accomplish.  

I 'm a bit lost on this one .. It seems quite simple, yet I can't find a way to do it.  Any help would be greatly appreciated ...
The Group module is what you should be looking at ... It's not °overkill° (as in your question), instead it's the only stable contributed D8 module available today that will also address your needs.

For this specific question, you'd enable the gnode submodule, and for each group type you would define the appropriate permissions (view, edit, delete, etc) for the various Content Types. Refer to my answer to "How to configure access to courses for teachers and students?" for a sample configuration.

Note:

Let me address (part of) your additional comment below this answer also, which is like so:


  I will need to have quite a few Groups in my case - one for each course taught by more than 1 teacher.


If I was to configure the Group module for your case, I would use an approach like so:


Create a Group type = Courses.
Create Group roles =  Teacher and Student.
Create exactly 1 Group for each possible Course, labeled (say) C1, C2, C3, ....
Only grant the Group Permission to "edit" a node of content type "Course" to users who have been granted the "Group role" Teacher. And as per your "I want all nodes to still be publicly viewable by anyone (even anonymous users)", you want to grant "View" access to "Outsiders" and "Anonymous", and probably also to "Students".
If only teacher (user) T1 is teaching Course C1, then only T1 is granted the Group role "Teacher" for (group) C1.
If teachers (users) T2 and T3 are teaching Course C2, then only T2 and T3 are granted the Group role "Teacher" for (group) C2.
When creating nodes of type "Course", assign them to 1 (and only one) Group (so either C1, C2, or C3, or ...). And decide about which teacher(s) (user(s)) Tx the newly created Course will be granted the Group role "Teacher".


Done ... 

Resources


Community documentation for the Group module.
Video tutorial "How to use the Group module in Drupal 8 to manage editorial access control to different areas of a web site".