Changeset fc5f5b in indico


Ignore:
Timestamp:
08/08/11 12:08:32 (22 months ago)
Author:
Jose Benito <jose.benito.gonzalez@…>
Branches:
master, hello-world-walkthrough, ipv6, v0.98-series, v0.98.2, v0.98.3, v0.98b2, v0.99, 051b2622c51afb171a1dedb46a0df4fbb0cbd02e, 0da0c1403bae8e51d8229f460181c71b9e6dda72
Children:
ca8a8d
Parents:
89502b
git-author:
Alberto Resco Perez <alberto.resco.perez@…> (06/20/11 12:24:09)
git-committer:
Jose Benito <jose.benito.gonzalez@…> (08/08/11 12:08:32)
Message:

[FIX] Inconsistency domain protection and key

  • Checks before the key and after, the domain protection.
  • Closes #349.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • indico/MaKaC/conference.py

    r8234edd rfc5f5b  
    37893789            not restricted. 
    37903790        """ 
    3791  
    37923791        # Allow harvesters (Invenio, offline cache) to access 
    37933792        # protected pages 
     
    37953794            return True 
    37963795        ##################################################### 
    3797  
    3798         if not self.canIPAccess(aw.getIP()) and not self.canUserModify(aw.getUser()) and not self.isAllowedToAccess( aw.getUser() ): 
     3796        if self.getAccessKey()!= "": 
     3797            if self.canKeyAccess( aw ) and not self.canUserModify(aw.getUser()) and not self.isAllowedToAccess( aw.getUser() ): 
     3798                return False 
     3799        elif not self.canIPAccess(aw.getIP()) and not self.canUserModify(aw.getUser()) and not self.isAllowedToAccess( aw.getUser() ): 
    37993800            return False 
    38003801        if not self.isProtected(): 
    38013802            return True 
    3802         flag = self.isAllowedToAccess( aw.getUser() ) 
    3803         return flag or self.canKeyAccess( aw ) 
     3803        return self.isAllowedToAccess( aw.getUser() ) 
    38043804 
    38053805    def canKeyAccess( self, aw, key=None ): 
Note: See TracChangeset for help on using the changeset viewer.