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

🐛 Bug Report: Team Membership Create returns wrong membership #3583

Closed
2 tasks done
TheMardy opened this issue Jul 21, 2022 · 3 comments
Closed
2 tasks done

🐛 Bug Report: Team Membership Create returns wrong membership #3583

TheMardy opened this issue Jul 21, 2022 · 3 comments
Labels
bug Something isn't working good first issue Good for newcomers product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Milestone

Comments

@TheMardy
Copy link
Contributor

TheMardy commented Jul 21, 2022

👟 Reproduction steps

Create a team membership, I get my membership as response instead of the newly created membership.

👍 Expected behavior

Get the newly created membership as response.

👎 Actual Behavior

I get my own membership.

I think
$email and $name
should be used instead of the $user.

Take a look at this, as this worked fine in v0.13.4 :
https://github.com/appwrite/appwrite/blob/master/app/controllers/api/teams.php#L422

, Response::MODEL_MEMBERSHIP);

🎲 Appwrite version

Version 0.15.x

💻 Operating system

Linux

🧱 Your Environment

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

@TheMardy TheMardy added the bug Something isn't working label Jul 21, 2022
@stnguyen90
Copy link
Contributor

From the docs, a Membership object should be returned:

{
    "$id": "5e5ea5c16897e",
    "$createdAt": 1592981250,
    "$updatedAt": 1592981250,
    "userId": "5e5ea5c16897e",
    "userName": "John Doe",
    "userEmail": "john@appwrite.io",
    "teamId": "5e5ea5c16897e",
    "teamName": "VIP",
    "invited": 1592981250,
    "joined": 1592981250,
    "confirm": false,
    "roles": [
        "admin"
    ]
}

Are you saying userId, userName, and userEmail should be of the person being added, but right now, it returns the info of the person creating the membership?

Can you clarify what's incorrect about team?

@TheMardy
Copy link
Contributor Author

Indeed, userId, userName, and userEmail should be of the person being added, but right now, it returns the info of the person creating the membership.
Nothing is wrong with the Team.

@stnguyen90 stnguyen90 added the good first issue Good for newcomers label Jul 22, 2022
iifawzi added a commit to iifawzi/appwrite that referenced this issue Jul 22, 2022
iifawzi added a commit to iifawzi/appwrite that referenced this issue Jul 22, 2022
…name and email

Signed-off-by: Fawzi E. Abdulfattah <iifawzie@gmail.com>
@stnguyen90 stnguyen90 modified the milestones: 0.16.0, 0.15.4 Jul 27, 2022
eldadfux added a commit that referenced this issue Aug 3, 2022
…bership-to-return-added-name-email

Fixing #3583 - create team membership to return added person name and…
@eldadfux eldadfux added product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services. and removed teams labels Aug 14, 2022
@stnguyen90
Copy link
Contributor

Closing as should be resolved in next release.

@stnguyen90 stnguyen90 modified the milestones: 0.15.4, 1.0.0 Sep 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers product / auth Fixes and upgrades for the Appwrite Auth / Users / Teams services.
Projects
None yet
Development

No branches or pull requests

3 participants