Hello, I just can’t figure out how to implement a private site. I need to implement a site/project1/page1,page2,page3 which are accessible to users of the group ‘project1users’, and a different site/project2/pagea,pageb,pagec which are accessible to group ‘project2users’.
I’ve tried to understand if the admin plugin or the login plugin do these kind of things, but unfortunately I just didn’t get if they do and I am missing some bit of information, or if they just don’t.
BTW, all the access stuff is totally arbitrary. You can put whatever you want.
You can specifically deny access to any particular string, or allow. Just those strings (site.log, admin.login, foo.bar.x.y, etc), would need to match up in the YAML of the user if you want to provide or deny access.
There are really no restrictions, you can do pretty much anything with it.
The login plugin simply runs through any access rules on a page, and checks if the current logged in user has any rules that match, if the user does, access is granted, else a login prompt is displayed.
That’s all it does, so the rules you come up with and define are up to you.
First, don’t set a custom URL. It will create a login page automatically ‘on the current’ page by default. So remove that custom login path. Learn2 does not have a form.html.twig, you would have to create one, or use the one from Antimatter as a base.
Every page in your learn site (or the restricted pages at least) would need to have that access: site.login: true setting that is explained in the login README.