Skip to content
This repository was archived by the owner on Nov 8, 2023. It is now read-only.
This repository was archived by the owner on Nov 8, 2023. It is now read-only.

Make UI understand user rights in suborganizations #532

@Rikuoja

Description

@Rikuoja

Currently, the UI only checks the admin organizations of the user when determining whether editing an event is allowed, or whether events are displayed on the main page.

The API, however, does allow the user to edit suborganization events, but the UI currently doesn't know that, and no such cases have been needed thus far.

However, if need arises,

  1. https://github.com/City-of-Helsinki/linkedevents-ui/blob/master/src/utils/checkEventEditability.js#L28 should be changed to allow editing suborganization events.

This would require some API work to give the UI information on which organization events may be edited, or, preferably, returning user_may_edit or similar boolean in the API per event. This way, UI and API would always be in agreement on which events may be edited.

  1. https://github.com/City-of-Helsinki/linkedevents-ui/blob/master/src/views/EventListing/index.js#L210 should be changed so that the API returns all events the user may edit, not only those in user admin organizations.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions