CuBoulder / lil_shrugger

Atlas' Best Friend
2 stars 2 forks source link

Don't Call APIs/Services With Blank Credentials #409

Closed alexfinnarn closed 5 years ago

alexfinnarn commented 5 years ago

Right now, all the possible interactions on page load don't check for credentials which can lead to error messages on URLs where credentials are needed to get a response.

This issue can be fixed before the request is made to Atlas or GitHub.

alexfinnarn commented 5 years ago

There was a check to get the latest version of a release and compare it to the code that exists on the various ways the Lil' Shrugger application is deployed. Ideally, with a continuous integration setup, the version checking won't be needed. There could be a nice feature playing off of that to inform users of new features since they last visited the app.

https://github.com/CuBoulder/lil_shrugger/blob/2.x/src/components/Navbar.vue#L79

I commented out that check for now since it runs on all the routes but the 2.x version won't check releases in the same way.

alexfinnarn commented 5 years ago

I added a shrugger.getCreds(credentialName) method so that localStorage, the Vuex store or whatever else can be indirectly checked through that method.

alexfinnarn commented 5 years ago

Well, https://github.com/CuBoulder/lil_shrugger/blob/2.x/src/services/shrugger.ts#L75 is stupid. There's no reason why the current route should be needed. I'm adding useCurrentRoute: boolean = false to quickly allow for just passing in the whole permission name.