Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/release_18.01' into usegalaxy
Browse files Browse the repository at this point in the history
  • Loading branch information
natefoo committed Feb 19, 2018
2 parents c786adf + af7b0ab commit fa283b5
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 22 deletions.
6 changes: 3 additions & 3 deletions client/galaxy/scripts/mvc/history/hdca-li-edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,17 @@ var HDCAListItemEdit = _super.extend(
</a>
<ul class="dropdown-menu pull-right" role="menu">
<li>
<a href="" class="delete-collection">
<a href="#" class="delete-collection">
${_l("Collection Only")}
</a>
</li>
<li>
<a href="" class="delete-collection-and-datasets">
<a href="#" class="delete-collection-and-datasets">
${_l("Delete Datasets")}
</a>
</li>
<li style="display: ${this.purgeAllowed ? "inherit" : "none"}">
<a href="" class="delete-collection-and-purge-datasets">
<a href="#" class="delete-collection-and-purge-datasets">
${_l("Permanently Delete Datasets")}
</a>
</li>
Expand Down
3 changes: 3 additions & 0 deletions config/reports.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ uwsgi:

offload-threads: 8

static-map: /static/style=static/style/blue
static-map: /static=static

module: galaxy.webapps.reports.buildapp:uwsgi_app()

reports:
Expand Down
3 changes: 3 additions & 0 deletions config/tool_shed.yml.sample
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ uwsgi:

offload-threads: 8

static-map: /static/style=static/style/blue
static-map: /static=static

module: galaxy.webapps.tool_shed.buildapp:uwsgi_app()

tool_shed:
Expand Down
35 changes: 16 additions & 19 deletions lib/galaxy/auth/providers/ldap_ad.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def _get_subs(d, k, params):
return str(d[k]).format(**params)


def _parse_ldap_options(ldap, options_unparsed):
def _parse_ldap_options(options_unparsed):
# Tag is defined in the XML but is empty
if not options_unparsed:
return []
Expand All @@ -42,26 +42,23 @@ def _parse_ldap_options(ldap, options_unparsed):
log.warning("LDAP authenticate: Invalid syntax '%s' inside <ldap-options> element. Syntax should be option1=value1,option2=value2" % opt)
continue

try:
pair = []
for n in (key, value):
if not n.startswith(prefix):
raise ValueError

name = getattr(ldap, n)
pair.append(name)

except ValueError:
log.warning("LDAP authenticate: Invalid parameter pair %s=%s. '%s' doesn't start with prefix %s", key, value, n, prefix)
if not key.startswith(prefix):
log.warning("LDAP authenticate: Invalid LDAP option '%s'. '%s' doesn't start with prefix '%s'", opt, key, prefix)
continue

try:
key = getattr(ldap, key)
except AttributeError:
log.warning("LDAP authenticate: Invalid parameter pair %s=%s. '%s' is not available in module ldap", key, value, n)
log.warning("LDAP authenticate: Invalid LDAP option '%s'. '%s' is not available in module ldap", opt, key)
continue

else:
log.debug("LDAP authenticate: Valid LDAP option pair %s=%s -> %s=%s", key, value, *pair)
ldap_options.append(pair)
if value.startswith(prefix):
try:
value = getattr(ldap, value)
except AttributeError:
log.warning("LDAP authenticate: Invalid LDAP option '%s'. '%s' is not available in module ldap", opt, value)
continue
pair = (key, value)
log.debug("LDAP authenticate: Valid LDAP option pair '%s' -> '%s=%s'", opt, *pair)
ldap_options.append(pair)

return ldap_options

Expand Down Expand Up @@ -128,7 +125,7 @@ def ldap_search(self, email, username, options):
except ConfigurationError:
ldap_options = ()
else:
ldap_options = _parse_ldap_options(ldap, ldap_options_raw)
ldap_options = _parse_ldap_options(ldap_options_raw)

try:
# setup connection
Expand Down

0 comments on commit fa283b5

Please sign in to comment.