User roles and permission linked to personal sub-page

Im creating a site for a creative workspace where all the residents will have there own subpage. Which will show some of their work, exhibition events, bio etc. And im trying to figure out if its possible to have roles that are linked to specific pages. An account page Id linked to a Role id?

Like Person A can update his own portfolio and add some news articles on the homepage. But is not able to go into/or edit the page of Person B.

Thanks in Advance!

Yes, that can. be achieved using permissions

Cool thanks!
And is it also possible to create a new user and automatically a new member page will be created?
Super new in this so dont know what to search.

Yes, this can be done with a user.create hook

i cant seem to link it to a username. Is this the right direction?

'' => function() { 
  return $this->target()->page()->title() = $this->username();

thanks in advance

Not quite.

First of all, if you want to compare values, you have to use a comparison operator, not an assignment operator.

Secondly, you have to get the user before you can call the username.

And last, this will only work if the title is exactly the same as the username; you might want to compare to the uid instead of the title.

This could work, though not tested:

'' => function() { 
  return $this->target()->page()->title() == $this->user()->username();

By the way, you can always edit your posts and don’t have to create new ones. Also, please always wrap code within three backticks on a separate line before and after your code block. Thank you.