Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#274 closed defect (invalid)

data model permissions are only being added to 'auth_permissions' if custom permissions are also defined

Reported by: oubiwann@… Owned by: Adrian Holovaty
Component: Tools Version:
Severity: normal Keywords: permissions, database, tables, data model
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


(The following is adapted from an email I posted to the user group mail list here: )

There is a discrepancy between the permissions and the data
inserted into the permissions table. It *seems* the only
way to get permissions to populate the table properly is to define your
own. As soon as you define a permission of your own, and then run the
command install <your app>

the auto-generated perms + your custom perm get added to the proper
table in the database.

For instance, in your Poll class, add the following line:

  permissions = (("dummy", "Dummy permission"),)

and then run install polls

After install runs, you should see the three automatic/intrinsic perms as well as
your custom dummy permission. If this procedure is not performed (i.e., no custom permission is defined in the data model, the auth_permissions table does not get populated with the app's automatic permissions.

Change History (1)

comment:1 Changed 13 years ago by Adrian Holovaty

Resolution: invalid
Status: newclosed

Permissions are only created in the auth_permissions table if a given model has an admin parameter set.

Note: See TracTickets for help on using tickets.
Back to Top