Skip to content

Commit fb71ba7

Browse files
committed
Add OIDC plugin activation control
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.
1 parent 077401e commit fb71ba7

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

config/ProjectConfiguration.class.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ public function setup()
4848
'sfPluginAdminPlugin',
4949
];
5050

51+
// Check if the OIDC plugin should be enabled.
52+
$filePath = 'activate-oidc-plugin';
53+
if (file_exists($filePath) && 0 === filesize($filePath)) {
54+
$plugins[] = 'arOidcPlugin';
55+
}
56+
5157
$this->enablePlugins($plugins);
5258

5359
$this->dispatcher->connect(

0 commit comments

Comments
 (0)