#7851 closed (worksforme)
In admin console getting: "You don't have permission to edit anything"
Reported by: | eka | Owned by: | |
---|---|---|---|
Component: | contrib.auth | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
In admin console getting: "You don't have permission to edit anything"
OS: Mac Os X ver 10.4 (tiger) and Windows XP SP2.
python version: 2.5.2 (macports) 2.5.2 on Windows also.
django version: (0, 97, 'pre').
using db sqlite3.
Just checked out form SVN.
I'm getting "You don't have permission to edit anything" when logging in admin application, I'm logged in successfully but I'm not able to edit anything.
From sqlite command line I can see the account in auth_user table.
In my XP box this was working with no problem with a previous version, I just SVN co to see if it was happening also in another OS.
I tried creating another superuser account, but the problem remains.
Change History (8)
comment:1 by , 16 years ago
follow-up: 3 comment:2 by , 16 years ago
(This seems to be an "Admin interface" component rather than "Authentication".)
I'm also seeing this in revision 8007. The groups, users, and sites options aren't being shown, so users can't be added or edited, for instance. This is happening in a newly created application as well an existing one. Models are being shown: the "You don't have permission to edit anything" message is shown if there are no models.
Thanks for mentioning the backwards-incompatible changes page, I didn't know this existed.
Adding admin.autodiscover() to the existing app and the new app does the trick. Shouldn't this be in a new urls.py by default?
comment:3 by , 16 years ago
Replying to anonymous:
Thanks for mentioning the backwards-incompatible changes page, I didn't know this existed.
If you're running from an SVN checkout and updating reularly, you really should be tracking that page! Particularly as 1.0 gets closer, which is the cutoff for making backwards-incompatible changes. There are a number of pending ones that are all going to hit in a relatively short period of time now (newforms-admin merge and removal of oldforms are two that happened in the last couple of days, but I'm sure there are more on the way).
Adding admin.autodiscover() to the existing app and the new app does the trick. Shouldn't this be in a new urls.py by default?
There's another ticket open for that. I think the answer is yes but I'm not fully up to speed on all the ramifications of this new code yet.
comment:4 by , 16 years ago
Hi,
Sorry for the inconvenience. I'm not porting any app, but installing it on a new machine to follow the djangobook. I noted some changes in the urls.py for the admin app, but didn't know that a call to admin.autodiscover() was needed.
Shouldn't the djangbook or somewhere in the documentation make us aware of this? Cause the djangobook also recommends installing from SVN, so a notice would be nice.
Thanks for your comments.
Regards
comment:5 by , 16 years ago
Yes, I would have thought any book that recommends running from and regularly updating from svn would mention you should always check for backwards-incompatible changes here:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
before updating. It is prominently noted here:
http://www.djangoproject.com/documentation/install/#installing-the-development-version
If the book doesn't have a similar note then that is unfortunate, but there's nothing I can do about it myself.
comment:6 by , 16 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
All but one of the reports on the user's list of this have turned out to be issues with not calling autodiscover() or not running the correct level of code, and the last report hasn't come back with any details to recreate. I'm tending to believe there is no bug in the code here, just a configuration update issue that unfortunately numerous people have tripped over.
comment:7 by , 16 years ago
Sorry for the delay. No bug on my side. It was my disinformation alone.
Thanks Karen for your patience.
Regards.
comment:8 by , 16 years ago
You can get this on a new project if you copy some old templates directory which includes an old admin subdirectory.
There's not enough information here to help you very much. You don't mention if you have done the required migration of your code from old to new admin (newforms-admin was just merged to trunk, as mentioned on the backwards-incompatible changes page). If not, that's likely your problem. If so, one of the things you might have missed is including a call to admin.autodiscover() in your urls.py file. Really this problem is better addressed on the user's list, but I'll leave this open for now as a catch-all since we do have people reporting the problem even though it sounds like they have done all the required configuration.