Logging in as a user other than `admin`, and having a large amount of workspaces results in potentlially substantial delays in loading almost every webui wicket page, as WorkspaceAdminComponentAuthorizer will be run several times, each of them potentially doing a full scan of workspaces, to determine if the user has admin privileges in at least one workspace, delegating to ResourceAccessManager for each workspace.
WorkspaceAdminComponentAuthorizer has a long-standing “TODO” comment to revisit and somehow cache the result on a per-request basis.
This on itself would speed up webui page rendering as the “full scan” of workspaces and authorization checks would be performed only once.
Additionally, the check done by WorkspaceAdminComponentAuthorizer could be moved to ResourceAccessManager itself, giving implementations a chance to provide a faster solution.
Logging in as a user other than `admin`, and having a large amount of workspaces results in potentlially substantial delays in loading almost every webui wicket page, as WorkspaceAdminComponentAuthorizer will be run several times, each of them potentially doing a full scan of workspaces, to determine if the user has admin privileges in at least one workspace, delegating to ResourceAccessManager for each workspace.
WorkspaceAdminComponentAuthorizer has a long-standing “TODO” comment to revisit and somehow cache the result on a per-request basis.
This on itself would speed up webui page rendering as the “full scan” of workspaces and authorization checks would be performed only once.
Additionally, the check done by WorkspaceAdminComponentAuthorizer could be moved to ResourceAccessManager itself, giving implementations a chance to provide a faster solution.