Is there a function modul that checks if a user has a certain permission role?
Simillar to 'authority_check'