Research profile has access to a plug-in settings?

Hi - just wondering if this can be changed easily. We have the Solr Search plug-in installed. I created a test researcher profile because we’d like to have a subset of our users be able to have access to viewing non-public items. However, I noticed that the Solr plug-in seems to still allow this profile to make changes to the setting, including “Clear and Reindex” (!). It seems to be the only plug-in that allows edits/changes to be made. Can this be changed and, if so, how?

I’m not especially familiar with the Solr Search plugin, but it sounds like they just haven’t changed the Access Control List to restrict access. That’d be a change/addition to the plugin’s define_acl hook.

1 Like

Hi Patrick,

Thanks for the reply. I tried adding ‘define_acl’, to the plugin’s protected hooks and got a bunch of Omeka errors, i.e. I added it arbitrarily to:

protected $_hooks = array(

and got:

Exception 'Omeka_Plugin_Exception' with message 'Hook callback "hookDefineAcl" does not exist.' in [domain]/omeka/application/libraries/Omeka/Plugin/AbstractPlugin.php:162
Stack trace:
#0 [domain]/omeka/application/libraries/Omeka/Plugin/AbstractPlugin.php(106): Omeka_Plugin_AbstractPlugin->_addHooks()
#1 [domain]/omeka/plugins/SolrSearch/plugin.php(45): Omeka_Plugin_AbstractPlugin->setUp()
#2 [domain]/omeka/application/libraries/Omeka/Plugin/Loader.php(374): require('/var/www/vhosts...')
#3 [domain]/omeka/application/libraries/Omeka/Plugin/Loader.php(217): Omeka_Plugin_Loader->_loadPluginBootstrap(Object(Plugin))

… (etc etc)

So is there something else I should be changing somewhere, i.e. calling to some library?

After adding that to the list of hooks, Omeka will expect there to be a function called hookDefineAcl that does the actual job of setting up the permissions. Without knowing the inner workings of the plugin, it’s hard to guess exactly what should go in there.

It might be worth asking about this as an issue on the plugin’s GitHub page.

1 Like

I submitted a pull request that was merged to SolrSearch’s develop branch to fix this issue:

I do not know why the project has not packaged a new release with this change. I would recommend downloading a copy of the develop branch to use as the plugin from:

1 Like

Thank you! To be clear: I should just replace (i.e. overwrite) the current SolrSearch plug-in folder with this one, correct? I guess I’ll need to note my current plug-in settings before doing so.

Yes, it should just work if you overwrite your current SolrSearch plug-in folder. If you’ve made any changes to that folder that you want to keep, you should back those up first. This code shouldn’t cause any changes to the settings or database, but it’s always wise to back up before making any changes.

1 Like

Thank you - that worked perfectly!