consumerreports / ccpa-authorized-agent

MIT License
3 stars 4 forks source link

show a message if ENABLE_STUDY_FULL=(1/True/true) in process environment #6

Closed rrix closed 3 years ago

rrix commented 3 years ago

Deploy heroku with this variable set in the application configuration to disable new signups but not revocation+verification endpoints

Some of the text still needs to be edited/audited, nonpublic Google Docs URL in it which I can also include easily enough when Maggie can provide it.

not a big fan of the massive changes in the diff , but that'll happen when you have to add new branches to code... none of the logic is really changed except for the escape hatch.

rrix commented 3 years ago

image

I used the same .column which is used to divide the regular pages in to two sections, but i'm not sure it looks good offset like this. defer to folks with an aesthetic sense.

rrix commented 3 years ago

@moates @ginnyfahs i expect this to be pretty straightforward to review; to test it you can add ENABLE_STUDY_FULL to docker-compose.yml

i can pretty quickly add a FAQ page given a doc before we land this and update the URL

ginnyfahs commented 3 years ago

Thank you!

I have time with Legal this week for final approval of the FAQ, at which point we can add it as a new page in the app to avoid the google docs link. Will let you know when that's ready. So appreciate the help here!

rrix commented 3 years ago

Cleared the nit; i'll let this marinate until copy is approved and we can merge it all in one go.

moates commented 3 years ago

When I tried to Docker build this, I ran into a syntax error. Not sure if I somehow have a stricter syntax checker enabled?

/opt/webapp/member.js:22 webapp_1 | const member = await Member.create({

webapp_1 | SyntaxError: await is only valid in async function webapp_1 | at wrapSafe (internal/modules/cjs/loader.js:984:16) webapp_1 | at Module._compile (internal/modules/cjs/loader.js:1032:27) ...

It's been a hot minute since I wrote any javascript, so idk if this is the kosher approach, but I was able to build by adding the async keyword to studyFullCheck's callback function in member.js

router.post('/sign-up', handleAsync(async (req, res) => {
  studyFullCheck(req, res, async () => {
    const member = await Member.create({ ...
rrix commented 3 years ago

no, i don't think it's your or your environment's fault, it looks like it's mine :) i apparently don't understand all this async/await stuff, not sure why I thought I could push it like this!

moates commented 3 years ago

@rrix I added views/faq.mustache with the approved copy and markup.

I started to add the routing logic myself but got a little confused about where to best handle that so it wouldn't get caught in study-full, so I'll leave that to you, or ask you for a pointer.

rrix commented 3 years ago

thanks for pushing the copy, i added GET /faq in https://github.com/consumerreports/ccpa-authorized-agent/pull/6/commits/3e37a2f8d34e704ebaa6288d18cbc65d030deb89