Exemple #1
0
    def update(self):
        self.manage = get_manage_url(self.request)
        self.permissions = sorted(ptah.get_permissions().values(), key=lambda p: p.title)

        acls = ptah.get_acls()
        self.acls = sorted([acl for acl in acls.values() if acl.id != ""], key=lambda a: a.title)
        self.acls.insert(0, ptah.DEFAULT_ACL)
Exemple #2
0
    def test_acl_register(self):
        pmap = ptah.ACL('map', 'ACL', 'Map')
        self.init_ptah()

        self.assertTrue(pmap.id == 'map')
        self.assertTrue(pmap.title == 'ACL')
        self.assertTrue(pmap.description == 'Map')
        self.assertTrue(ptah.get_acls()['map'] is pmap)
Exemple #3
0
    def update(self):
        self.permissions = ptah.get_permissions().values()
        self.permissions.sort(key = lambda p: p.title)

        acls = ptah.get_acls()
        self.acls = [acl for acl in acls.values() if acl.name != '']
        self.acls.sort(key = lambda a: a.title)
        self.acls.insert(0, ptah.DEFAULT_ACL)
Exemple #4
0
    def test_acl_register(self):
        pmap = ptah.ACL('map', 'ACL', 'Map')
        self.init_ptah()

        self.assertTrue(pmap.id == 'map')
        self.assertTrue(pmap.title == 'ACL')
        self.assertTrue(pmap.description == 'Map')
        self.assertTrue(ptah.get_acls()['map'] is pmap)
Exemple #5
0
    def update(self):
        self.manage = get_manage_url(self.request)
        self.permissions = sorted(ptah.get_permissions().values(),
                                  key=lambda p: p.title)

        acls = ptah.get_acls()
        self.acls = sorted([acl for acl in acls.values() if acl.id != ''],
                           key=lambda a: a.title)
        self.acls.insert(0, ptah.DEFAULT_ACL)
Exemple #6
0
    def test_acl_register(self):
        import ptah

        pmap = ptah.ACL("map", "ACL", "Map")
        self._init_ptah()

        self.assertTrue(pmap.name == "map")
        self.assertTrue(pmap.title == "ACL")
        self.assertTrue(pmap.description == "Map")
        self.assertTrue(ptah.get_acls()["map"] is pmap)