Skip to content

feat(core): read sentinel policy settings #7255

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

Conversation

simeng-li
Copy link
Contributor

@simeng-li simeng-li commented Apr 9, 2025

Summary

Read custom sentinel policy settings from sign-in experience settings. If none is provided, fall back to the default settings.

Testing

UT case added.

Checklist

  • .changeset
  • unit tests
  • integration tests
  • necessary TSDoc comments

@simeng-li simeng-li requested review from a team April 9, 2025 03:57
Copy link

github-actions bot commented Apr 9, 2025

COMPARE TO master

Total Size Diff 📈 +4.72 KB

Diff by File
Name Diff
packages/core/src/sentinel/basic-sentinel.test.ts 📈 +3.74 KB
packages/core/src/sentinel/basic-sentinel.ts 📈 +1000 Bytes
packages/core/src/tenants/Tenant.ts 📈 +9 Bytes

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (2)

packages/core/src/sentinel/basic-sentinel.ts:142

  • Ensure that the returned sentinelPolicy from findDefaultSignInExperience is validated to avoid merging undefined or unexpected values into the default policy.
const { sentinelPolicy } = await findDefaultSignInExperience();

packages/core/src/sentinel/basic-sentinel.test.ts:140

  • [nitpick] Consider adding tests to directly verify getSentinelPolicy's behavior when dev features are disabled, ensuring that the default policy is consistently used in that scenario.
describe('BasicSentinel  with custom policy', () => {

@simeng-li simeng-li force-pushed the simeng-log-11225-schemas-add-sentinel-settings-to-sie branch from 5ef6010 to e8e218f Compare April 10, 2025 06:32
@simeng-li simeng-li force-pushed the simeng-log-11227-core-update-experience-to-read-sentinel-settings-from-sie branch from 2d28ea3 to cc74b15 Compare April 10, 2025 06:33
Base automatically changed from simeng-log-11225-schemas-add-sentinel-settings-to-sie to master April 11, 2025 02:29
read custom sentinel policy settings from SIE
fix integration tests
@simeng-li simeng-li force-pushed the simeng-log-11227-core-update-experience-to-read-sentinel-settings-from-sie branch from cc74b15 to a527be4 Compare April 11, 2025 02:30
@simeng-li simeng-li merged commit e73adf1 into master Apr 11, 2025
34 checks passed
@simeng-li simeng-li deleted the simeng-log-11227-core-update-experience-to-read-sentinel-settings-from-sie branch April 11, 2025 03:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants