Roles in Mendix are defined at design time, not in runtime. So no, what you are saying is not possible out of the box. In runtime you can assign roles to users, but the configuration of the role itself is not manageable in runtime.
You can use xpaths in your role configuration for more dynamic access control if needed: https://docs.mendix.com/refguide/access-rules/#xpath-constraint
I've seen developers attempt to implement self designed custom roles, but all efforts i've seen ended in uncontrollable complexity. I would advice you not to go there: i've never seen it succeed.
I hope this helps.
So you need a finegrained way to define which user can do what. Mendix offers this, but this needs to be defined at design time, there is no possibility to do this in runtime.
Let me think out of the box for a moment. Some options i can think of.
I hope this helps.
Can you already not do it from Account overview?
You can assign roles to specific users from this page right?
Jumping in this discussion;
As Tim and Michiel already pointed out, this is not out-of-the-box available. This is not a lack of functionality, this is a choice of Mendix. Which is IMHO a very good one.
Since page view is directly related to data access. This should not be managed from runtime. Keeping this in the model will give a much more secure application.
Better start questioning the customer why they want it. Guess there will be found more interesting answers then trying to make it work as asked. In the end you will see that is it is about specific roles in the app, which will perform specific task and go through certain processes. And thus modeling it in design time, setting up the right user roles which can be assigned to the users in runtime will do the job.
My experience on these in runtime configurations is:
Long story short; you are using a Low code platform. Use it accordingly.