Code

Opened 8 years ago

Closed 7 years ago

#2270 closed task (fixed)

Current Code & Update for Row Level Permissions

Reported by: Chris Long <indirecthit@…> Owned by: Chris Long <indirecthit@…>
Component: Contrib apps Version: magic-removal
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Here is the current code for the Row Level Permissions. I haven't done much documentating at this point.

Model tests are being written, I have attached what is done so far. There is one test that does fail because the DB is not initialized the way it was when I was using hte shell. Should be fixed up soon, but I want to have it creating the default permissions to test one of the utility methods I've created.

The actual code for RLP is located in the contrib.auth package, I've attached the code here. Changes are only made to the models and a new file called util is added. This is not the latest svn update (w/ multi-auth).

I have begun working on an application to edit RLPs, hoping to use this and integrate it into the admin interface. Easier to figure out the details w/o having to integrate it into the admin interface. Will do that after I know how I want everything to work. Currently it only creates RLPs, I am looking into the easiest way of having multiple forms on the page in this instance. See my blog (http://blog.indirecthit.com) for an idea of what I want the interface to look like. I am hesitant about using hidden fields to tell me which RLP is being edited because this could pose a security risk (You possibly could have RLPs for RLPs), but I'm not sure of another way of doing it. Suggestions welcome.

If you have any questions, please post here, on my blog or by emailing me. I'm supposed to be getting a SVN branch soon that should be easier to monitor.

Attachments (3)

django.contrib.auth-rowlvlperms.tgz (36.0 KB) - added by Chris Long <indirecthit@…> 8 years ago.
Modified contrib.auth package w/ RLPs
permEditApp.tar.gz (10.2 KB) - added by Chris Long <indirecthit@…> 8 years ago.
RLP Edit Application
rowLvlPerm-modeltest.tar.gz (1.5 KB) - added by Chris Long <indirecthit@…> 8 years ago.
Model Tests for Row Level Perms

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by Chris Long <indirecthit@…>

Modified contrib.auth package w/ RLPs

Changed 8 years ago by Chris Long <indirecthit@…>

RLP Edit Application

Changed 8 years ago by Chris Long <indirecthit@…>

Model Tests for Row Level Perms

comment:1 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

Closing this because there's a branch.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.