Skip to content

Conversation

@AlexJacksonDS
Copy link
Contributor

@AlexJacksonDS AlexJacksonDS commented Oct 18, 2021

JIRA link

https://softwiretech.atlassian.net/browse/HEEDLS-496

Description

Fixed button being displayed when it shouldn't be. Fixed layout issues. Converted page to the new application setting system.

Screenshots

Delegate with no password has no button:
image

Delegate already admin has no button
image

Re-ordered elements at the top of the page
image
image

Updated email in use message
image


Developer checks

(Leave tasks unticked if they haven't been appropriate for your ticket.)

I have:

  • Run the formatter and made sure there are no IDE errors.
  • Written tests for the changes (accessibility tests, unit tests for controller, data services, services, view models, etc)
  • Manually tested my work with and without JavaScript. Full manual testing guidelines can be found here: https://softwiretech.atlassian.net/wiki/spaces/HEE/pages/6703648740/Testing
  • Updated/added documentation in Swiki and/or Readme. Links (if any) are below:
  • Updated my Jira ticket with information about other parts of the system that were touched as part of the MR and have to be sanity tested to ensure nothing’s broken.
  • Scanned over my own MR to ensure everything is as expected.

Copy link
Contributor

@livzorn livzorn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks all good to me :)

Copy link
Contributor

@DanBloxham-sw DanBloxham-sw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor additional check to make unless I am missing something.

var delegateUser = userDataService.GetDelegateUserCardById(delegateId);

if (delegateUser == null || delegateUser.CentreId != centreId)
if (delegateUser == null || delegateUser.CentreId != centreId || delegateUser.IsAdmin)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As we also hide the button when the delegate does not have a password set can we add another check here so the users can't get around it with URL manipulation.

@AlexJacksonDS AlexJacksonDS force-pushed the HEEDLS-496-promote-delegate-to-admin branch from 764f075 to b81a957 Compare October 21, 2021 13:07
@AlexJacksonDS AlexJacksonDS merged commit ca9b833 into master Oct 21, 2021
@AlexJacksonDS AlexJacksonDS deleted the HEEDLS-496-promote-delegate-to-admin branch October 21, 2021 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants