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

User is able creating a PD without being a recipient #168

Open
PatrickRoethlisberger opened this issue Jan 28, 2022 · 1 comment
Open

User is able creating a PD without being a recipient #168

PatrickRoethlisberger opened this issue Jan 28, 2022 · 1 comment
Assignees
Labels

Comments

@PatrickRoethlisberger
Copy link

Bug Report

Current Behavior
A user is able to create a private discussion without being a recipient when he deletes himself in the initial recipient's selection.

Steps to Reproduce

  1. Create a new PD
  2. Remove own user from recipients
  3. Post discission

Expected Behavior
The user is prevented from creating PDs that he is not part of.

Environment

  • Flarum version: 1.0.4
  • Extension version: 1.1.1

Possible solution(s)
Prevent user from removing himself/ display a warning when a user tries to delete himself that he's not able adding himself back again

Additional Context
Posts from discussion which user 6 created and invited users 2 and 4 while removing himself:

DB [flarum]> select id,user_id,type,content from posts where discussion_id = 123;
+-------+---------+--------------------+--------------------------------------------------------------------+
| id    | user_id | type               | content                                                            |
+-------+---------+--------------------+--------------------------------------------------------------------+
|  1234 |       6 | comment            | <t><p>Content</p></t>                                              |
|  1235 |       6 | recipientsModified | {"new":{"users":[2,4],"groups":[]},"old":{"users":[],"groups":[]}} |
+-------+---------+--------------------+--------------------------------------------------------------------+
@DavideIadeluca
Copy link
Member

Thanks @PatrickRoethlisberger for your bug report. While your environment is very old compared to today, I'm still able to reproduce the issue today with version 1.3.6 of fof/byobu. This definitely needs to be fixed!

@FriendsOfFlarum FriendsOfFlarum deleted a comment from imorland Jun 19, 2024
@FriendsOfFlarum FriendsOfFlarum deleted a comment from imorland Jun 19, 2024
@FriendsOfFlarum FriendsOfFlarum deleted a comment from imorland Jun 19, 2024
@FriendsOfFlarum FriendsOfFlarum deleted a comment from imorland Jun 19, 2024
@FriendsOfFlarum FriendsOfFlarum deleted a comment from imorland Jun 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants