Esempio n. 1
0
File: views.py Progetto: benmao/xfox
 def get(self,slug):
     p = int(self.request.get("p","1"))
     tag = get_or_404(Tag.get_tag_by_slug,slug)
     #check ACL
     check_roles(self,tag.role)
     self.p = p
     get_cell(tag.tag_type).tag_list(self,tag)
Esempio n. 2
0
File: views.py Progetto: benmao/xfox
 def post(self,slug):
     tag = get_or_404(Tag.get_tag_by_slug,slug)
     #check ACL
     check_roles(self,tag.role)
     check_roles(self,tag.add_role)
     
     self.m = 'post'
     get_cell(tag.tag_type).add(self,tag)
Esempio n. 3
0
    def get(self, slug):
        tag = get_or_404(Tag.get_tag_by_slug, slug)
        # check ACL
        check_roles(self, tag.role)
        check_roles(self, tag.add_role)  # addrole

        self.m = "get"
        get_cell(tag.tag_type).add(self, tag)
Esempio n. 4
0
File: views.py Progetto: benmao/xfox
 def get(self,slug,key):
     dis = get_or_404(Discussion.get_discussion_by_key,slug,key)
     #check ACL
     check_roles(self,dis.role)
     
     if dis.user_name != self.user.name :
         return self.error(403) #shoud be 403 :)
     
     self.m = 'get'
     get_cell(dis.tag.tag_type).edit(self,dis)