0

I'm working on a project using django and angular and I need to make some pages accessible only to superusers. I've read somewhere that it isn't advisable to make this available to clients. If so is there any way to make some pages visible only to superusers? I'm new at this so forgive me if the question sound naive. Thank you

HackAfro
  • 720
  • 1
  • 12
  • 28
  • Of course there is; you can check permissions in the view. Are you using DRF? – Daniel Roseman Dec 18 '16 at 20:10
  • I believe [this](http://stackoverflow.com/a/12003808/6485881) is the answer to your problem. – Maurice Dec 18 '16 at 20:11
  • Yes @DanielRoseman I am. – HackAfro Dec 18 '16 at 20:12
  • It could be but I don't think i understand it. Like I said before I'm pretty new and I might need a little explanation to go with the answer – HackAfro Dec 18 '16 at 20:16
  • 1
    Well there's a whole [page on permissions](http://www.django-rest-framework.org/api-guide/permissions/) in the DRF documentation. – Daniel Roseman Dec 18 '16 at 20:17
  • I see that but what I'm looking for is actually frontend related. I want to use the is_superuser attribute to know if a logged in user can visit the 'achives' page for example, if not they should be redirected with the message that they don't have access to visit the page @DanielRoseman – HackAfro Dec 18 '16 at 20:44

0 Answers0