Open-event-server: every user is organizer for every event

Created on 20 Feb 2019  Â·  20Comments  Â·  Source: fossasia/open-event-server

Describe the bug

Please refer to the screen shot given below

Expected behavior

Only the events whom the user is actually an organiser should be displayed

Screenshots

image

Desktop (please complete the following information):

  • OS: [e.g. iOS] Ubuntu
  • Browser [e.g. chrome, safari] Chrome

Additional context

Working on it

bug

All 20 comments

@iamareebjamal @CosmicCoder96 I think the problem lies in the fact that currently organizer_events relationship is having no validation checks as to whether the user is actually an organiser or not.

https://github.com/fossasia/open-event-server/blob/b7ffa627f94ccae389939e47840d605e610da257/app/api/schema/users.py#L151-L157

    organizer_events = Relationship(
        self_view='v1.user_organizer_event',
        self_view_kwargs={'id': '<id>'},
        related_view='v1.event_list',
        schema='EventSchema',
        many=True,
        type_='event')

How should I proceed to make sure that the Relationship actually checks whether the current user is an organiser in the event or not, I could use help in this

@uds5501 are you still working on this?

@prabhupant No I am not, but would like to provide a heads up. It's a FE issue. The relations are correct in the server but not in the frontend. If you want to take over, be my guest

@uds5501 Transfer it to FE

@uds5501 Wanted to know if the server is providing correct relation than Is it hardcoded for every user?

@kushthedude the server side relationships are working fine. as I have already mentioned above :)

@uds5501 Can i work on this issue ?

@Haider8 Progress?

Yes, working on it. Was stuck in some college work.

On Sun, Mar 31, 2019, 1:12 AM Kush Trivedi <[email protected] wrote:

@Haider8 https://github.com/Haider8 Progress?

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/fossasia/open-event-frontend/issues/2390#issuecomment-478282903,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ApSyUOS2nSBe5huSdeAc4j21LlTV5pmeks5vb746gaJpZM4cI3cv
.

@uds5501 @prabhupant I think this issue is not there anymore

@Haider8 It is still there :)
image

@uds5501 If you haven't spent much time on it, May I work on this issue?

@prateekj117 Go for it!

@uds5501 This problem doesn't seem to persist on my system.

Please try makin an event from a super user, and one from a new user and
let me know the results.

On Sun, 7 Apr 2019, 16:16 Prateek Jain, notifications@github.com wrote:

@uds5501 https://github.com/uds5501 This problem doesn't seem to
persist on my system.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/fossasia/open-event-frontend/issues/2390#issuecomment-480579002,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AUHDVYdVIS1obi-vWaEATuHaFGrWKAXeks5vecx8gaJpZM4cI3cv
.

@uds5501 Yes, you are right. The problem persists.

@CosmicCoder96 @iamareebjamal This is a temporary fix. I think that this issue is of the server as @uds5501 commented above. Can you please transfer this to the server so that I can do the permanent fix there.

@prateekj117 this is an issue at the front-end only. Happening due to incorrect model relationships at ember model levels. The server side relations are working fine, I have verified

@uds5501 Thanks for the info. In that case, I will look into it.

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.86. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SaptakS picture SaptakS  Â·  3Comments

schedutron picture schedutron  Â·  4Comments

Aju100 picture Aju100  Â·  4Comments

mariobehling picture mariobehling  Â·  4Comments

Masquerade0097 picture Masquerade0097  Â·  3Comments