adapter icon indicating copy to clipboard operation
adapter copied to clipboard

fix: sas9 public access denied handling

Open medjedovicm opened this issue 2 years ago • 2 comments

Issue

Fixes #150

Intent

Covers the SAS9 Public Access Denied scenario. 2 places touched:

  1. login() - User is not logged in. The login function is called with Public Account credentials. The adapter will return an object that contains an error message with error details and loggedIn is false. (image 1.)
  2. request() - User with Public Account is already logged in within current browser. App loads, request function is called. The adapter will throw an error with details inside. (image 2.)

image 1. public-access-on-login

image 2. public-access-on-request

Checks

No PR (that involves a non-trivial code change) should be merged, unless all items below are confirmed! If an urgent fix is needed - use a tar file.

  • [x] All sasjs-cli unit tests are passing (npm test).
  • (CI Runs this) All sasjs-tests are passing. If you want to run it manually (instructions available here).
  • [x] Data Controller builds and is functional on both SAS 9 and Viya

medjedovicm avatar Sep 07 '22 16:09 medjedovicm

Coverage report

Total coverage

Status Category Percentage Covered / Total
🟡 Statements 62.72% 2027/3232
🔴 Branches 44.67% 738/1652
🔴 Functions 53.56% 301/562
🟡 Lines 73.99% (+2.25% 🔼) 3283/4437

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Show files with reduced coverage 🔻

Reduced coverage

Status Filename Statements Branches Functions Lines
🟢 src/job-execution/WebJobExecutor.ts 16.07% 2.6% 10.53% 100% (+72.85% 🔼)

Status of coverage: 🟢 - ok, 🟡 - slightly more than threshold, 🔴 - under the threshold

Report generated by 🧪jest coverage report action from 3556eb39034bc1884f870b8cf2f5c9c703779834

github-actions[bot] avatar Jul 12 '23 09:07 github-actions[bot]

@medjedovicm please a test cases for both scenarios

YuryShkoda avatar Jul 12 '23 10:07 YuryShkoda