Changeset 2451

Show
Ignore:
Timestamp:
07/11/07 03:23:05 (1 year ago)
Author:
kisg
Message:

SvnAuthzAdminPlugin:

Add support for interleaved path and group sections to the parser.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • svnauthzadminplugin/0.10/svnauthz/io.py

    r2442 r2451  
    125125        if subjectstr.startswith("@"):             
    126126            assert (len(subjectstr) > 1)         
    127             subject = m.find_group(subjectstr.lstrip("@")
     127            subject = m.find_group(subjectstr.lstrip("@"), True
    128128            assert (subject != None) 
    129129        else: 
  • svnauthzadminplugin/0.10/svnauthz/model.py

    r2442 r2451  
    150150        return self.paths 
    151151     
    152     def find_group(self, name): 
     152    def find_group(self, name, creategroup=False): 
    153153        for g in self.groups: 
    154154            if name == g.get_name(): 
    155155                return g 
     156        if creategroup: 
     157            g = Group(name, []) 
     158            self.add_group(g) 
     159            return g 
    156160        return None 
    157161     
  • svnauthzadminplugin/0.10/svnauthz_test/io.py

    r2442 r2451  
    99        m = r.read("testdata") 
    1010        self.assertEquals(m.serialize().strip(),open("testdata","r").read().strip()) 
     11         
     12    def test_parse_mixed(self): 
     13        r = AuthzFileReader() 
     14        m = r.read("testdata-mixed") 
     15        self.assertEquals(m.serialize().strip(),open("testdata","r").read().strip())