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

[Platform] [User Notifications][TUS] Notifications are available and read-only within logged-in user context #173

Open
4 tasks
becevka opened this issue Apr 28, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request Platform

Comments

@becevka
Copy link
Contributor

becevka commented Apr 28, 2024

Summary
In order to support User Notifications, we need to assign them to the user and prevent unauthorized access to notification data.

Describe the solution you'd like
Notifications Collection should consist of the following fields:

  • event, reference to Event Collection
  • user, reference to the user subscribed to Business Entity
  • createdDateTime, date when event was created
  • readDateTime, date when event was marked as read and switched to be inactive

Notifications endpoint should allow only read notifications for the currently logged in user (utilizing Strapi Policies).
Notifications endpoint should not allow any modifications to notifications.
Notifications endpoint should allow to filter notifications by createdDateTime and readDateTime fields.

Acceptance Criteria

Generated by Zenhub AI

  • Scenario: Notifications are assigned to the user
    • Given a user is logged in
    • When a notification is created
    • Then the notification should have a reference to the user
  • Scenario: Notifications endpoint only allows read access for the logged-in user
    • Given a user is logged in
    • When the user requests their notifications
    • Then the user should only be able to read their notifications
  • Scenario: Notifications endpoint does not allow modifications to notifications
    • Given a user is logged in
    • When the user attempts to modify their notifications
    • Then the user should receive an error or be unable to make changes
  • Scenario: Notifications endpoint allows filtering by createdDateTime and readDateTime fields
    • Given a user is logged in
    • When the user filters their notifications by createDate and active fields
    • Then the user should receive a filtered list of notifications based on the specified criteria
@becevka becevka added the enhancement New feature or request label Apr 28, 2024
@becevka
Copy link
Contributor Author

becevka commented May 5, 2024

@oriyomibadmus

  • Please add a user to existing Notification to experiment with strapi Policies.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Platform
Projects
None yet
Development

No branches or pull requests

3 participants