Using Django 1.8 and Mezzanine 4.0 and Python 3, if I assign a user as staff, I find they don't have permission to log into the admin pages of my site. They can if I assign them as superuser (which I don't want to do). My ALLOWED_HOSTS is set up properly and the same domain appears in the "Site permissions" list for the users.
I've searched online for others who have experienced this but the only thread I found was someone who found that the problem mysteriously resolved itself when they reinstalled their entire stack (which I don't want to do either!)
Can anyone shed any light?
If you open up the settings for the user you can select the site that you want it to have access to. Check out this for further information: How to set the permissions for admins of Django/Mezzanine sites
Related
I've just taken a copy of my drupal 8 database from staging and loaded this on my development enviroment.
I now get access denied when I try to login /admin
Can't find any information on why.
Update
Seems to be something to do with a twig service where the urlGenerator is not being implemented. Still no luck fixing this.
In hoster`s panel try find "IP address:" settings and change it from "Dedicated IP" (this option can have dependant "This site processes direct requests to a dedicated IP address" tick) to "Shared IP".
Without doing login in your site, you can not access the admin screen.
For example : If your site is justprogrammer.com and you try to open link justprogrammer.com/admin without login then you are not able to access the page. Before accessing the admin link, you first need to login using justprogrammer.com/user.
You cannot just access any /admin/* pages on drupal without logging in. For that you have to login from /user/login put in the username and relevant password then you can access the admin side if you really have admin role and actually logging in from admin account.
If you don't know the password for admin simply reset them to whatever you want by this drush command.
drush upwd --password="YourPassword" 1
1 is user id of admin.
I have a site in Joomla
http://kvmshop.kr.cisinlive.com/administrator/index.php . I am trying to login in admin area but I am not able to login. It always redirects me to the same page without any error i.e http://kvmshop.kr.cisinlive.com/administrator/index.php .
I read in some forums that this issue occurs due to whitespaces in configuration file. I removed whitespaces too from configuration file.
I set 644 permission for configuration files.
Please help me with this issue. I am fed up with this.
Are you able to access your database tables with something like PHPMyAdmin? The first that comes to mind is that there is something in there set to "0" (or, unpublished).
If you can access your tables, go to the jos_plugins table and search for a value called User - Joomla and for another value called Authentication – Joomla, if those are set to 0 then that is the issue, set that to 1 and click "Go" or "Save".
That should fix the login issue.
I am developing an application using Django 1.4. When I log into admin site in another tab in the browser, the application interface in which I am already logged in automatically logs out. Please help me in solving this issue. The browser I am using is Firefox. Thanks in advance.
Admin is also a user in django. So, you can't have more than one user logged in at the same time in the same browser, can you? Try the same scenario on facebook. This is what it is. You re fine, there's no problem.
On the side note, if you are just getting started with your project use Django 1.5.
Well you cannot log into the same website with different login ids simultaneously until and unless you dont use some plugins for this feature or you are opening different ids in the incognito window.
Since admin is a superuser(still a user), hence you cannot open a multiple django accounts in the same browser. One account will be logged out in order to open the other one. This is no issue. Happy coding.
The Django admin site is just another page of your Django main website. Say if you have foo.com, then foo.com/admin/ shows you the admin portal.
And we already know that two users cannot be simultaneously logged in to the same website from the same browser.
So, you can test on your foo.com site, being an admin user itself. Experience on the Django website for any user will be same, it doesn't change with user being a staff member or superuser. Only admin site has different permissions based on these factors.
In this case, you'll be able to use both the main site, as well as admin portal.
But if you really want to use different user accounts for admin site and main site, then you should either use different browsers or Private window in Firefox.
Im developing a google app engine and django based site and i'm tring to figure out what's
the best approach to solve the problem, the site requirments are as follows:
There must be a super administrator who's only task is to create second level administrators and assign them to a group.
Second level administrators can create regular users and those users are assigded to the same group from the admin that created them.
Regular users don't do much besides login and logout.
I've been reading and i think i can solve 1 with the (login: admin) GAE feature for app.yaml.
I don't want to use google accounts neigther openid because second level admins are
the only allowed to create users.
For 3. Is it possible to use django session utility to handle regular users ?
I'd appreciate suggestion for a particular point or the whole thing.
For 1:
login:admin in app.yaml will prevent users that are not associated with your GAE project from visiting that URL or set of URLs. Any user associated with your GAE production project is an admin. You can create additional filtering inside the application by confirming the username that they are currently logged in with.
from google.appengine.api import users
user = users.get_current_user()
email = user.email()
For 3:
I am not sure, we ended up rolling our own.
I'm running a relatively fresh Django app that I haven't added much to. I tried to set up the admin (which I've done on plenty of other apps) to create some sample data while I build out the app, but whenever I try to log in with the super user account I created I get kicked back to the login screen.
When I enter incorrect credentials, I see the proper error message... I just can't get it to take me past the login screen to the admin when I have correct credentials. Has anyone else had this problem and been able to solve it? I'm at a dead end troubleshooting.
Check that SESSION_COOKIE_SECURE is not set while you are not using HTTPS.
Looks like your cookies are messed up. Please start with clearing cookies in browser. If it doesn't help you can also check if your cookies configuration for project is correct. List of settings for cookies configuration can be found here.
Use the below settings for the SESSION_COOKIE_DOMAIN:
SESSION_COOKIE_DOMAIN = "yourdomain.com"