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

feat: allowlist and denylist #283

Merged
merged 3 commits into from
Feb 15, 2024
Merged

feat: allowlist and denylist #283

merged 3 commits into from
Feb 15, 2024

Conversation

mfts
Copy link
Owner

@mfts mfts commented Feb 15, 2024

closes #52

Copy link

what-the-diff bot commented Feb 15, 2024

PR Summary

  • Addition of 'allow-list-section' and 'deny-list-section' components
    New React components were added for managing who can and cannot access a certain link. This is featured in newly added allow-list-section.tsx and deny-list-section.tsx files in components/links/link-sheet directory.

  • Email Authentication Logic Enhancement
    Email authentication related texts and logic were updated in email-authentication-section.tsx file. It now requires email verification which can be enabled based on the emailAuthenticated value.

  • Email Protection Logic Update
    Email protection now depends on the emailProtected value in the email-protection-section.tsx of components/links/link-sheet directory.

  • Implementation of Accordion Component
    A collapsible content section, Accordion, was implemented in the components/ui/accordion.tsx file. Also, its related components were incorporated into the index.tsx in the components/links/link-sheet directory.

  • Addition of advanced Link access function & Updates in links-table.tsx
    Advanced link access options were implemented, which included the addition of allowList and denyList in the links-table.tsx in the components/links directory.

  • Update of Scroll Area
    The scroll-area.tsx in the components/ui directory now includes the ScrollBar component.

  • New Function for Sanitizing Allow/Deny List
    A function was introduced in utils.ts for sanitizing input to the allow/deny list, allowing only email or domain items to be kept.

  • Updated Dependencies, API handlers, and Prisma schema
    With the addition of allowList and denyList, several files such as package.json, index.ts, [id]/index.ts, views.ts, and schema.prisma were updated.

  • Migration File Addition
    For the Link database model, the allowedEmails column was dropped, and allowList and denyList columns were added. This change is reflected in the newly added migration.sql file in the prisma/migrations/20240215035046_add_allow_deny_list_to_links directory.

  • Tailwind Configuration Update
    To include new animations for the accordion component, the tailwind configuration in the tailwind.config.js file updated.

In conclusion, this PR enables more comprehensive control of link access with allow and deny lists; along with various updates to ensure seamless integration of these features.

@mfts mfts merged commit f610f4a into main Feb 15, 2024
2 checks passed
@mfts mfts deleted the feat/allow-deny-list branch March 17, 2024 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Can control access by email domains
1 participant