Merged in [19919] from rjsparks@nostrum.com:

Allow secretariat to edit session requests when tool is closed to chairs. Fixes #3547.
 - Legacy-Id: 19927
Note: SVN reference [19919] has been migrated to Git commit c8a99dcec4112169a286406aa2c6f5c1b3e3d62c
This commit is contained in:
Robert Sparks 2022-02-14 18:02:17 +00:00
parent 97cf457da8
commit 844890eadc
2 changed files with 7 additions and 1 deletions

View file

@ -733,6 +733,12 @@ class LockAppTestCase(TestCase):
r = self.client.get(url)
self.assertEqual(r.status_code, 200)
q = PyQuery(r.content)
self.assertEqual(len(q(':disabled[name="submit"]')), 0)
chair = self.group.role_set.filter(name_id='chair').first().person.user.username
self.client.login(username=chair, password=f'{chair}+password')
r = self.client.get(url)
self.assertEqual(r.status_code, 200)
q = PyQuery(r.content)
self.assertEqual(len(q(':disabled[name="submit"]')), 1)
def test_view_request(self):

View file

@ -572,7 +572,7 @@ def edit(request, acronym, num=None):
form = FormClass(group, meeting, initial=initial)
return render(request, 'sreq/edit.html', {
'is_locked': is_locked,
'is_locked': is_locked and not has_role(request.user,'Secretariat'),
'is_virtual': meeting.number in settings.SECR_VIRTUAL_MEETINGS,
'meeting': meeting,
'form': form,