Skip to content

add federation#972

Merged
jeriox merged 44 commits into
mainfrom
federation
Oct 7, 2023
Merged

add federation#972
jeriox merged 44 commits into
mainfrom
federation

Conversation

@jeriox
Copy link
Copy Markdown
Contributor

@jeriox jeriox commented Jun 7, 2023

first draft with on-demand events fetching according to design blog.

  • frontend view that collects shared events from hosts
    • make it look like the regular event view
    • display correct signup url
  • views for OAuth flow
    • transmit qualifications
    • note that other inclusions may lead to weird stuff
  • event detail view for federated users
    • decide how to authorize against host
    • permission checking (is the event shared for the guest?)
  • shift signup for federated users
  • view to manage share for an event
    • use checkboxmultiselect
  • invite-flow
    • add explanations
    • add delete views
    • prevent OAuth app from being deleted
    • handle invite code expiration
    • confirmation view when redeeming code
    • show invite code in reveal view
    • invite code with URL as complete link
  • fix naming
    • Menüpunkt: Externe Veranstaltungen
    • Plugin: Federation
    • Eventform: Share event with other ephios instances
    • Settings: Ephios instances that you share events with; Ephios instances that share events with you: Share events with someone else; Enter invite key
  • check if own permission class for sharedeventlistview is a good idea (maybe set guest there?) -> doesn't make sense as the signature only allows to return a user and one cannot set stuff in the request
  • tests

@coveralls
Copy link
Copy Markdown

coveralls commented Jun 7, 2023

Coverage Status

coverage: 87.802% (-0.8%) from 88.644% when pulling d6705e7 on federation into 34fee3e on main.

Comment thread ephios/plugins/federation/models.py
@felixrindt felixrindt self-requested a review June 12, 2023 19:25
Comment on lines +77 to +98
response = requests.post(
urljoin(data["host_url"], reverse("federation:redeem_invite_code")),
data={
"name": global_preferences_registry.manager()["general__organization_name"],
"url": data["guest_url"],
"client_id": oauth_application.client_id,
"client_secret": oauth_application.client_secret,
"code": data["code"],
},
)

Check failure

Code scanning / CodeQL

Full server-side request forgery

The full URL of this request depends on a [user-provided value](1).
Comment thread ephios/plugins/federation/views/frontend.py Fixed
@jeriox jeriox marked this pull request as ready for review June 14, 2023 21:42
Comment on lines +35 to +45
r = requests.get(
urljoin(host.url, reverse("federation:shared_event_list_view")),
headers={"Authorization": f"Bearer {host.access_token}"},
timeout=5,
)

Check failure

Code scanning / CodeQL

Full server-side request forgery

The full URL of this request depends on a [user-provided value](1).
Comment thread ephios/plugins/federation/views/api.py Outdated
Comment thread ephios/api/templates/oauth2_provider/application_list.html Outdated
@jeriox jeriox requested a review from felixrindt July 20, 2023 21:43
Comment thread ephios/api/views/users.py
Comment thread ephios/plugins/federation/views/frontend.py Outdated
Comment thread ephios/plugins/federation/templates/federation/invitecode_form.html Outdated
Comment thread ephios/plugins/federation/templates/federation/external_event_list.html Outdated
Comment thread ephios/plugins/federation/views/api.py Outdated
Comment thread ephios/plugins/federation/templates/federation/external_event_list.html Outdated
Comment thread ephios/plugins/federation/templates/federation/event_detail.html Outdated
Comment thread ephios/plugins/federation/views/api.py Outdated
Comment thread ephios/plugins/federation/views/api.py Outdated
Comment thread ephios/plugins/federation/forms.py
Comment thread ephios/plugins/federation/views/api.py Outdated
Comment thread ephios/plugins/federation/views/api.py Outdated
Comment thread ephios/core/templatetags/settings_extras.py Outdated
@felixrindt felixrindt added this to the Dennis milestone Aug 6, 2023
@felixrindt felixrindt added the [C] feature New feature or request label Aug 6, 2023
@jeriox jeriox requested a review from felixrindt August 7, 2023 17:39
Comment thread ephios/plugins/federation/views/frontend.py Outdated
Comment thread ephios/plugins/federation/signals.py Outdated
Comment thread ephios/plugins/federation/models.py Outdated
Comment thread ephios/plugins/federation/models.py Outdated
Comment thread ephios/plugins/federation/signals.py Outdated
Comment thread ephios/plugins/federation/signals.py Outdated
Comment thread ephios/plugins/federation/models.py Outdated
@felixrindt felixrindt mentioned this pull request Aug 10, 2023
1 task
Comment thread tests/settings.py Outdated
Comment thread pyproject.toml
@jeriox jeriox enabled auto-merge (squash) October 7, 2023 22:39
@jeriox jeriox merged commit 078333b into main Oct 7, 2023
@jeriox jeriox deleted the federation branch October 7, 2023 22:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[C] feature New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants