Comments (4)
Hi @joelion,
Yes, you need only to add it to INSTALLED_APPS
and run migrate
. The package doesn't contain any actual migrations. It uses migrate
to create the new permissions on the db (like django does for the default permissions).
I hope this to answer your question.
Thanks,
Lefteris
from django-admin-view-permission.
Got it. I was expecting more fanfare, so I didn't even check the admin page to see if it changed.
However, now as soon as I enable the plugin and go to admin, I don't have any permissions to see or do anything on the admin site.
My account is a superuser (screenshot taken when plugin isn't enabled)
from django-admin-view-permission.
Hi @joelion,
This not normal. Superuser should have the ability to see all the models.
Did you add the 'admin_view_permission' at the top on the INSTALLED_APPS? To see what's going wrong you can run python manage.py shell
and execute the following commands:
from django.contrib.auth.models import User
u = User.objects.get(username=<your username>)
u.user_permissions.all()
u.groups.all()
Both commands should return empty querysets. Otherwise set the user permissions and groups to null and try to login as superuser again.
Thanks,
Lefreris
from django-admin-view-permission.
Great, got it. I didn't realize that the order in INSTALLED_APPS mattered. Putting admin_view_permission at the top got everything working as expected.
Really surprised this feature it's built-in functionality... thanks
from django-admin-view-permission.
Related Issues (20)
- Change 'Change' button text to 'View' on admin index page if user only has view perm for model HOT 2
- No logs for View permissions HOT 1
- Determine if current admin form is view-only in __init__ HOT 3
- Auth User password hash is shown in default UserAdmin HOT 1
- users and groups admin site HOT 1
- You don't have permission to edit anything at the admin page HOT 9
- User can modify model when adding submit button HOT 2
- Django 2.0 support HOT 6
- Deleting object using Action menu raises KeyError: 'cl' HOT 2
- Users with view permission cannot see custom action HOT 1
- Adding users via /admin/auth/user/add/ throws error because password field doesn't exist HOT 3
- KeyError in admin using add user HOT 1
- Do not work with many to many inlines
- Apply permissions to Customized AdminSite classes HOT 2
- KeyError at `admin details page url` u"Key 'slug' not found in 'ModelForm'. Choices are: ."
- Django 2.1 Error: django.db.utils.IntegrityError: UNIQUE constraint failed: auth_permission.content_type_id, auth_permission.codename HOT 3
- Users with "change" permissions see "delete selected" action in drop down HOT 2
- Management command missing
- request not present in args but in kwargs HOT 1
- Readme not quite accurate HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-admin-view-permission.