I am trying to limit access to pages using 2 user levels. Superuser and admin.Super user is a regular Django user with 'is_superuser' assigned.Admin user is also a regular user with only the 'is_staff' permission assigned.
The problem is that when i use this decorator for an admin user, it doesn't pass the test:
@permission_required('is_staff')def my_view(....)
@permission_required('is_staff') returns false for anonymous users. (correct)
@permission_required('is_superuser') only returns true for superusers (correct)
@permission_required('is_staff') returns FALSE for users with the 'is_staff' perm assigned. (wrong).
حلو الشتي لما يبلغنا عن هيك جمال من بعد العاصفة. #الشوف #nature #art #home #my_view #naturally_photoshopped (at El Jalieh, Mont-Liban, Lebanon) https://www.instagram.com/p/BpZHb1enpHb/?utm_source=ig_tumblr_share&igshid=12lahqjhnmqst
New Mexico can't abandon oil and gas | My View New Mexico is blessed with a wealth of conventional fuels, mineral, and renewable vitality assets, from substantial oil and pure gasoline reserves, plentiful sunshine and wind to a good portion of America’s uranium reserves.After we embrace all that our state has to s...
No dream is too big it cannot be achieved, you should set your bar high so that you can push yourself to work harder and become a better version of yourself 💫🌙🌴🚲🌏✈️ #GoTravel #foco #blessed #CorpoSãoMenteSã#GreatShotDude #Nature_Featuring #Natures_Design #NaturePhotography #My_Best_Shot #GodIsGood #PhotoOfTheDay #IG_Nature #My_View #MotherNature #Beautiful #LoveLife #PrimeShots #BestNatureShots #Vagabond #Travele (at Southland, New Zealand) https://www.instagram.com/p/BzSdlZPjSTM/?igshid=ekopsy3yo7ad
να βλέπω γαλάζιο παντού και η σκέψη να χάνεται, εκεί που δεν μπορεί να βρεθεί το σωμα... #no_filter #my_view #plomari (στην τοποθεσία Plomári, Lesvos, Greece)
Nuclear weapons — they’re illegal https://www.santafenewmexican.com/opinion/my_view/nuclear-weapons-theyre-illegal/article_5238752a-5ad4-11eb-932c-2ff8ea90b754.html,By Jay Coghlan, 21 Feb21,
Jan. 22 will go down in history as the day when the tide turned against nuclear weapons. That was the day when theTreaty on the Prohibition of Nuclear Weapons went into effect, signed by 122 countries.
It…
When properly restored, arroyos can slow the flows of water and lessen damage from flash floods. Similarly, the “rain gardens” SFWA is building along ...
from Google Alert - water damage https://www.google.com/url?rct=j&sa=t&url=https://www.santafenewmexican.com/opinion/my_view/santa-fe-watershed-association-looks-ahead/article_fc33bb65-3e07-535c-a050-24f6a47cc1c2.html&ct=ga&cd=CAIyGmM1ODA0ODI0ZWVkYWI2OWU6Y29tOmVuOlVT&usg=AFQjCNHz4DIfX6Zu4acR6UDDkf8FPsEkww
For all endangered birds, and those that may become endangered, we continue to speak out about threats to the Endangered Species Act. Please let your elected officials know that a strong #ESA matters to you! (Photo of California Condor by Greg Lavaty.) http://www.santafenewmexican.com/opinion/my_view/looking-in-will-the-endangered-species-act-become-extinct/article_349a37a5-1003-5ccb-8386-b693016cd251.html #americanbirdconservancy #birdconservation #endangeredbirds #endangeredspecies #rarespecies #birdphotography #condorsofinstagram #birdsofinstagram #endangeredspeciesact