Skip to content

Commit

Permalink
merge master -Dorg -Ssuccess-only: PR 516 (Handle sudo connection in …
Browse files Browse the repository at this point in the history
…the account view)
  • Loading branch information
snoopycrimecop committed Dec 6, 2023
2 parents 3177ca9 + 80e14e3 commit ae17204
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 3 additions & 2 deletions omeroweb/webadmin/templates/webadmin/myaccount.html
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@

{% if ldapAuth %}
<div id="password"><label>LDAP: </label>{{ ldapAuth }}</div>
{% else %}
{% elif not isSudo %}

<div id="password">

Expand All @@ -308,8 +308,9 @@
</div>
{% endif %}


{% if not isSudo %}
<input type="submit" value="{% trans 'Save' %}" />
{% endif %}
</div>
<div style="clear:both"></div>
</form>
Expand Down
2 changes: 2 additions & 0 deletions omeroweb/webadmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1037,6 +1037,7 @@ def my_account(request, action=None, conn=None, **kwargs):
isLdapUser,
hasAvatar,
) = prepare_experimenter(conn)
isSudo = conn.getEventContext().sudoerId is not None
try:
defaultGroupId = defaultGroup.id
except Exception:
Expand Down Expand Up @@ -1092,6 +1093,7 @@ def my_account(request, action=None, conn=None, **kwargs):
context = {
"form": form,
"ldapAuth": isLdapUser,
"isSudo": isSudo,
"experimenter": experimenter,
"ownedGroups": ownedGroups,
"password_form": password_form,
Expand Down

0 comments on commit ae17204

Please sign in to comment.