US-EPA-CAMD / easey-ui

Project Management repo for EPA Clean Air Markets Division (CAMD) Business Suite of applications
MIT License
0 stars 0 forks source link

The "Sponsor" role or "Initial Authorizer" need to have the ability to submit- UI #5994

Open hamezene opened 9 months ago

hamezene commented 9 months ago

The "Sponsor" role or "Initial Authorizer" need to have the ability to submit. Code in easey-auth-api/src/sign/Sign.service.ts (authenticate method) continues to limit submissions to users with the "Submitter" role.

<<<>>>

if (!user.roles.includes('Submitter')) { throw new EaseyException( new Error('This requires the Submitter role'), HttpStatus.BAD_REQUEST, { responseObject: 'This requires the Submitter role', }, ); }

<<<>>>

This logic needs to be expanded to also allow users with the "Sponsor" role or "Initial Authorizer" role to make submissions. If there is already a zenhub ticket for this issue, then please send it along.

mark-hayward-erg commented 9 months ago

@shahbazkhan1999

There will be users that only have the Initial Authorizer role in CDX, and these users should be treated as Sponsors in ECMPS (i.e., anytime we check for the Sponsor role to allow an action also needs to check for the Initial Authorizer role).

shahbazkhan1999 commented 8 months ago

@spetros-do will review the PR https://github.com/US-EPA-CAMD/easey-ecmps-ui/pull/1393

lgiannini1 commented 6 months ago

@shahbazkhan1999 While logged in with my sponsor account lgiannini_sp, I do not see the Submit option on the side menu

Image

shahbazkhan1999 commented 6 months ago

added the Submit option in the menu

lgiannini1 commented 6 months ago

@shahbazkhan1999 I see the Submit option when I log in with my sponsor account, but clicking on it just takes me back to the home page.

shahbazkhan1999 commented 6 months ago

Fixed the issue with PR now submit works and show correct page

maheese commented 6 months ago

Test steps:

  1. Created an account in CDX test with the IA role (mheese-ia)
  2. Made this account the DR for Barry (in cbsstagei)
  3. Logged into ECMPS test.

I can see the submit module in the menu and I can access the page, but my account does not have access to any facilities even though I'm the DR for Barry. I created #6190 for this issue.