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:
userremoved author ofthesisremoving entry inuserthesistable other app.usertries modifythesisusing our django app. , succeeds, because guardian , django not know change inuserthesis.
i thought solutions:
having cron job changes in
userthesischecking modification date of entry. easy check additions, removals require looking on relationships again.modifying oracle db schema add guardian db tables , creating triggers on
userthesistable. wouldn't this, because of oracle db being shared among number of different apps.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
Post a Comment