Hi, You’ll need to implement an intermediate permission classe that would perform the OR and delegate the permission check to the subclasses.
Regards, Xavier Ordoquy, Linovia. > Le 19 juil. 2017 à 19:29, William Huang <[email protected]> a écrit : > > Hi All, > > Is it possible to set permission_classes for OR relation ? > for example I want to allow a logged in user or an admin user to this view, > so I set: > > permission_classes = (IsAuthenticated, IsAdminUser) > > Is this correct? > > Thank you! > > -- > You received this message because you are subscribed to the Google Groups > "Django REST framework" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected] > <mailto:[email protected]>. > For more options, visit https://groups.google.com/d/optout > <https://groups.google.com/d/optout>. -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
