Hello, you could have a look at the "Authorization" page of the SQLAlchemy + URL dispatch wiki tutorial:
https://pyramid.readthedocs.io/en/latest/tutorials/wiki2/authorization.html Basically : you define your permission as string via an ACL mechanism. Your permissions may be global (e.g. all members of the "managers" group get the "manage" permission), or defined via a route factory. Route factories allow for policies such as: every authenticated user can "view" a page, its author can "edit" it. They also allow you to simplify the code of your views. Hope this helps, Laurent. Le dim. 9 mai 2021 à 20:17, Thierry Florac <tflo...@gmail.com> a écrit : > > Hi, > Are you asking about the way to protect a view with a permission, or about > the way to grant this permission to a request? > Best regards, > Thierry > -- > https://www.ulthar.net -- http://pyams.readthedocs.io > > > Le dim. 9 mai 2021 à 19:00, pzzcc <grcc...@gmail.com> a écrit : >> >> Hi, >> >> I am trying to wrap my head around some pyramid concepts and I am trying to >> figure out how does a view config know what a permission like ( view , edit >> , create ) is ? >> >> does it rely on the pyramid_tm r or the routes or what ? >> >> I know how to use them but I need to wrap my head againts some concepts. >> >> thanks. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "pylons-discuss" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to pylons-discuss+unsubscr...@googlegroups.com. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/pylons-discuss/2b676239-b805-40d6-9ae2-1e4c60a9a7dcn%40googlegroups.com. > > -- > You received this message because you are subscribed to the Google Groups > "pylons-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to pylons-discuss+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/pylons-discuss/CAPX_VWCYnWP_Rrbgk1ZBP1JBUN8KNztgj5%3DJ_Q_8%2B_uvAXAv_A%40mail.gmail.com. -- You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to pylons-discuss+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/pylons-discuss/CAB7cU6xwgFG72ngmk8bw1CMfwjBRQOxZ21WB4BQHZWJjPpT7qA%40mail.gmail.com.