Add RoleDumper and DumpListPermissionsCommand to generate a markdown list of permissions

This commit is contained in:
2025-09-05 16:55:45 +00:00
committed by GitLab
parent 90e3043c3d
commit 9c1611d052
7 changed files with 232 additions and 7 deletions

View File

@@ -52,12 +52,8 @@ class RoleProvider
/**
* Get the title for each role.
*
* @param string $role
*
* @return string the title of the role
*/
public function getRoleTitle($role)
public function getRoleTitle(string $role): ?string
{
$this->initializeRolesTitlesCache();
@@ -73,7 +69,7 @@ class RoleProvider
/**
* initialize the array for caching role and titles.
*/
private function initializeRolesTitlesCache()
private function initializeRolesTitlesCache(): void
{
// break if already initialized
if (null !== $this->rolesTitlesCache) {