Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OMERO.web client settings override server client settings #6053

Merged
merged 2 commits into from
Jul 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/tools/OmeroPy/src/omero/plugins/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -1658,7 +1658,7 @@ def _check(msg, vers):
vers = popen.communicate()[1]
_check("icegridnode version", vers)

def open_config(self, unused):
def open_config(self, unused=None):
"""
Callers are responsible for closing the
returned ConfigXml object.
Expand Down
17 changes: 17 additions & 0 deletions components/tools/OmeroWeb/omeroweb/webclient/webclient_gateway.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@

from omero.gateway import KNOWN_WRAPPERS

from omero.plugins.admin import AdminControl

from django.utils.encoding import smart_str
from django.conf import settings

Expand Down Expand Up @@ -239,6 +241,21 @@ def chgrpDryRun(self, targetObjects, group_id):
##############################################
# IAdmin ##

def getClientSettings(self):
"""
Returns all client properties matching omero.client.*
Local config settings override client settings sent by the server
"""
configmap = super(OmeroWebGateway, self).getClientSettings()
localcfg = AdminControl().open_config()
try:
for key in localcfg.keys():
if key.startswith('omero.client.'):
configmap[key] = localcfg[key]
return configmap
finally:
localcfg.close()

def getEmailSettings(self):
"""
Retrieves a configuration value "omero.mail.config" from the backend
Expand Down