Skip to content

Removed reliance on pelicanq fork of fastapi-users#525

Open
georgelgeback wants to merge 7 commits into
mainfrom
there-is-no-fork
Open

Removed reliance on pelicanq fork of fastapi-users#525
georgelgeback wants to merge 7 commits into
mainfrom
there-is-no-fork

Conversation

@georgelgeback

@georgelgeback georgelgeback commented Apr 11, 2026

Copy link
Copy Markdown
Contributor
  • Replaced pelicanq fork with non-forked fastapi-users and updated it
  • Updated some packages along with that
  • Added new tests for permissions and the new fastapi-users async wrapper fix
  • Fixed bug where user with manage perms could do things locked behind super perms

~ 400 LOC of this PR is tests, so the changes were not as large as I had expected before starting.

This PR uses a pretty unsatisfying method of wrapping the poor async fastapi-users so that we can interact with it in a non-async manner. That wrapper is pretty vibe coded, not my area of expertise (though there are tests and reviews consistently claim it's fine). Allegedly you could also choose to have two connections to the database, one sync and one async, and then rewrite user management, permission management and auth using async. You could also rewrite the entire backend to be async, but both of these would need quite a lot of work (no more direct references to db objects, update all the tests, querying in a different way etc.) so I thought this was the best alternative.

I think there could also be room for forking our own version of fastapi-users and only removing the async parts, if we really don't want the async wrapper.

Since this changes how permissions are communicated to PermissionWall in the frontend, this PR needs to be pushed to prod at the same time as the corresponding frontend one:

This comment was marked as resolved.

@georgelgeback
georgelgeback marked this pull request as ready for review July 25, 2026 17:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants