sqlcatalog: Re-implement with sqla in a framework-y way

Bug #1564419 reported by Paul Everitt
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
KARL4
Won't Fix
Medium
Andreas Kaiser

Bug Description

Make a new branch which reimplements the work on the sqlcatalog branch, but in a "framework-y" way:

- Convert to SQLAlchemy

- Some minimal tests that mock the database

- A "fill up the batch" approach to security filtering

Fill Up the Batch
===================

In the sqlcatalog branch, we don't store that actual ACL. We do, though, have a boolean column that stores whether the resource has a custom ACL (security_state).

The reasoning is that 98% plus of the content has no local ACL. It relies instead on the ACL of its context: the Blog class and the security settings on the community. Furthermore, for most views, we don't need to look at everything: only enough to fill the first batch.

Thus, I'm interested in an approach where we ask SQL for a batch-ful and, if any have a column value of security_state=true, run has_permission on that object. If it fails, throw it out of the batch.

I suspect you have lots of ninja SQLAlchemy tricks on how to do this, in a way that is testable.

Changed in karl4:
status: New → In Progress
milestone: 017 → 018
Changed in karl4:
milestone: 018 → 019
Revision history for this message
Paul Everitt (paul-agendaless) wrote :

I believe, given the 3 months into this, that we can retire this effort. The other (non-framework-y) fixes are proceeding along nicely. It would be nicer to do this in a single way, but the project doesn't have much traction, so let's forego it.

Revision history for this message
Paul Everitt (paul-agendaless) wrote :

I believe we can declare this effort aborted.

Changed in karl4:
milestone: 019 → 999
status: In Progress → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.