python - Django-guardian on DB with shared (non-exclusive) access -


i developing django app being web frontend oracle database local db keeping app's data such guardian permissions. problem can modified different places don't have control of.

let's have 3 models: user, thesis , userthesis.

userthesis - table specifying relationship between thesis , user (user being co-author of thesis)

scenario:

  1. user removed author of thesis removing entry in userthesis table other app.

  2. user tries modify thesis using our django app. , succeeds, because guardian , django not know change in userthesis.

i thought solutions:

  1. having cron job changes in userthesis checking modification date of entry. easy check additions, removals require looking on relationships again.

  2. modifying oracle db schema add guardian db tables , creating triggers on userthesis table. wouldn't this, because of oracle db being shared among number of different apps.

  3. manually checking relationship in views , templates (heavier load on oracle).

which 1 best? other ideas?

i decided go manually checking permissions, caching whenever can. ended get_perms_from_cache(self, user) model method helps me lot.


Comments

Popular posts from this blog

linux - Using a Cron Job to check if my mod_wsgi / apache server is running and restart -

actionscript 3 - TweenLite does not work with object -

jQuery Ajax Render Fragments OR Whole Page -