Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow passing an array of auth decoders to createGraphQLHandler #7685

Merged
merged 5 commits into from
Mar 1, 2023

Conversation

Tobbe
Copy link
Member

@Tobbe Tobbe commented Feb 24, 2023

This was supposed to have been included in #7349 but I missed to do that.

This PR also adds tests for the standard one-auth-decoder scenario that has always been missing tests. Plus adds test for the new array-of-auth-decoders scenario.

@Tobbe Tobbe force-pushed the tobbe-auth-decoders-array-w-tests branch from 47815a2 to 4bb5ef0 Compare February 24, 2023 23:16
@Tobbe Tobbe added the release:fix This PR is a fix label Feb 24, 2023
@replay-io
Copy link

replay-io bot commented Feb 24, 2023

16 replays were recorded for f7d709c.

image 0 Failed
image 16 Passed
    requireAuth graphql checks
          ```
          locator.waitFor: Target closed
          =========================== logs ===========================
          waiting for locator('.rw-form-error-title').locator('text=You don\'t have permission to do that') to be visible
          ============================================================
          ```
        </ol>
      </details>
      <li><a href=https://app.replay.io/recording/3d46e354-004c-4d4a-9f1d-1fa032b81b9b>useAuth hook, auth redirects checks</a></li>
      <li><a href=https://app.replay.io/recording/e9f48d16-9b68-4421-b97d-9d140e7d8088>Check that <meta> tags are rendering the correct dynamic data</a></li>
      <li><a href=https://app.replay.io/recording/e1c45d0c-9883-47de-b2ff-439873692215>Check that a specific blog post is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/fae2fedf-30cf-4371-b3e7-cb221f49fecb>Check that about is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/30fb8bc8-2277-4f99-bfc0-15b02bff14e2>Check that homepage is prerendered</a></li>
      <li><a href=https://app.replay.io/recording/012ef5d8-4a4a-429c-9712-89c4f9ec154e>Check that you can navigate from home page to specific blog post</a></li>
      <li><a href=https://app.replay.io/recording/cc290790-d98d-4514-92c9-4d85bfad5f1d>Waterfall prerendering (nested cells)</a></li>
      <li><a href=https://app.replay.io/recording/0a37f23a-627a-468c-9b95-b119ccd96376>RBAC: Admin user should be able to delete contacts</a></li>
      <li><a href=https://app.replay.io/recording/3d2fd2dd-0678-4d0d-b613-6f3d039bd27a>RBAC: Should not be able to delete contact as non-admin user</a></li>
      <li><a href=https://app.replay.io/recording/ec4492f9-2cbc-4ee4-a542-a9c6ea0df8e9>Smoke test with dev server</a></li>
      <li><a href=https://app.replay.io/recording/62c26cf0-d231-4c04-b89c-6d817c02015b>Smoke test with rw serve</a></li>
      <li><a href=https://app.replay.io/recording/8325f770-b783-4765-b81b-2c2f1590837d>Loads Cell mocks when Cell is nested in another story</a></li>
      <li><a href=https://app.replay.io/recording/ec757549-916a-41b6-b6f0-1536006e59a9>Loads Cell Stories</a></li>
      <li><a href=https://app.replay.io/recording/6d23a4d3-5d9d-4a20-abe6-8b55e6f1a763>Loads MDX Stories</a></li>
      <li><a href=https://app.replay.io/recording/1ae51d3e-084e-428f-9add-9d005d13e9b3>Mocks current user, and updates UI while dev server is running</a></li>
      

View test run on Replay ↗︎

@jtoar jtoar merged commit 5e452c5 into redwoodjs:main Mar 1, 2023
@redwoodjs-bot redwoodjs-bot bot added this to the next-release milestone Mar 1, 2023
@jtoar jtoar modified the milestones: next-release, next-release-patch Mar 1, 2023
thedavidprice pushed a commit that referenced this pull request Mar 1, 2023
* Allow passing an array of auth decoders to createGraphQLHandler

* Move the handler creation into the tests to make it clearer what we're testing
thedavidprice pushed a commit that referenced this pull request Mar 1, 2023
* Allow passing an array of auth decoders to createGraphQLHandler

* Move the handler creation into the tests to make it clearer what we're testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release:fix This PR is a fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants