I want to develop a system in which permission sets of user will be changing automatically based on some conditions.

i want to insert/delete permission sets of users programmatically, so that it happen at run time.

not all user will be super user.

how can i do that ?