Skip to content

Commit

Permalink
Add OIDC plugin activation control
Browse files Browse the repository at this point in the history
Add the ability for an admin to activate the OIDC plugin in a way that
does not require updating the ProjectConfiguration class file, or using
the plugin admin interface.

If the empty file 'activate-oidc-plugin' is present in the root of the
AtoM installation, the OIDC plugin will be enabled.

At this point in Symfony's startup, in ProjectConfiguration::setup()
config files like app.yml are not yet loaded which is why the presence
of an OS file is being used.
  • Loading branch information
sbreker committed Oct 30, 2024
1 parent 077401e commit bd6a687
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions config/ProjectConfiguration.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ public function setup()
'sfPluginAdminPlugin',
];

// Check if the OIDC plugin should be enabled.
$filePath = 'activate-oidc-plugin';
if (file_exists($filePath) && filesize($filePath) === 0) {
$plugins[] = 'arOidcPlugin';
}

$this->enablePlugins($plugins);

$this->dispatcher->connect(
Expand Down

0 comments on commit bd6a687

Please sign in to comment.