fixed place and remove hold

This commit is contained in:
David Kennedy 2025-03-07 07:04:39 -05:00
parent 6ef3f50a7b
commit 952f1c35cc
No known key found for this signature in database
GPG key ID: 6528A5386E66B96B
2 changed files with 7 additions and 3 deletions

View file

@ -4329,9 +4329,11 @@ class DomainAdmin(ListHeaderAdmin, ImportExportRegistrarModelAdmin):
# Fixes a bug wherein users which are only is_staff # Fixes a bug wherein users which are only is_staff
# can access 'change' when GET, # can access 'change' when GET,
# but cannot access this page when it is a request of type POST. # but cannot access this page when it is a request of type POST.
if request.user.has_perm("registrar.full_access_permission") or request.user.has_perm( if (
"registrar.analyst_access_permission" request.user.has_perm("registrar.full_access_permission")
) or request.user.has_perm("registrar.omb_analyst_access_permission"): or request.user.has_perm("registrar.analyst_access_permission")
or request.user.has_perm("registrar.omb_analyst_access_permission")
):
return True return True
return super().has_change_permission(request, obj) return super().has_change_permission(request, obj)

View file

@ -33,8 +33,10 @@
<input type="submit" value="Remove hold" name="_remove_client_hold" class="custom-link-button"> <input type="submit" value="Remove hold" name="_remove_client_hold" class="custom-link-button">
{% endif %} {% endif %}
{% if original.state == original.State.READY or original.state == original.State.ON_HOLD %} {% if original.state == original.State.READY or original.state == original.State.ON_HOLD %}
{% if not adminform.form.is_omb_analyst %}
<span class="margin-left-05 margin-right-05 text-middle"> | </span> <span class="margin-left-05 margin-right-05 text-middle"> | </span>
{% endif %} {% endif %}
{% endif %}
{% if original.state != original.State.DELETED and not adminform.form.is_omb_analyst %} {% if original.state != original.State.DELETED and not adminform.form.is_omb_analyst %}
<a class="text-middle" href="#toggle-remove-from-registry" aria-controls="toggle-remove-from-registry" data-open-modal> <a class="text-middle" href="#toggle-remove-from-registry" aria-controls="toggle-remove-from-registry" data-open-modal>
Remove from registry Remove from registry