marketing-factory / oauth2

Generic OAuth2 authentication and authorization for TYPO3 CMS
Other
9 stars 18 forks source link

Add support for users in inherited groups #40

Closed tehplague closed 2 years ago

tehplague commented 2 years ago

Currently mfc/oauth2 only supports users directly assigned to a projects. Additionally, users in groups directly associated with a project are supported. However, oauth2 lacks support for inherited users from parent groups or nested relations in groups.

This PR adds support for them. Due to a limitation in GitLab's API (https://gitlab.com/gitlab-org/gitlab/-/issues/369592) I re-implemented GitLab's inheritance logic inside the extension. My implementation currently comes with the caveat that currently the upper boundary for the access_level defined in a group relation is not respected. The code will instead always use the user's access_level inside the related group. This can later be added - although it'd be best if GitLab implemented support for getting the user's access level in a certain project.