Changeset 3cbf9eb for fedd/federation


Ignore:
Timestamp:
Sep 28, 2009 3:10:02 PM (15 years ago)
Author:
Ted Faber <faber@…>
Branches:
version-1.30
Parents:
2f14616
Message:

Adjust search order to check the expoerted project first.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/experiment_control.py

    r2f14616 r3cbf9eb  
    10671067                    "Must have at least one SSH pubkey for services")
    10681068
    1069 
    1070         for p, u in access_user:
     1069        # Tweak search order so that if there are entries in access_user that
     1070        # have a project matching the export project, we try them first
     1071        if export_project and export_project.has_key('localname'):
     1072            pn = export_project['localname']
     1073
     1074            access_sequence = [ (p, u) for p, u in access_user if p == pn]
     1075            access_sequence.extend([(p, u) for p, u in access_user if p != pn])
     1076        else:
     1077            access_sequence = access_user
     1078
     1079        for p, u in access_sequence:
    10711080            self.log.debug(("[get_access] Attempting access from (%s, %s) " + \
    10721081                    "to %s") %  ((p or "None"), u, uri))
Note: See TracChangeset for help on using the changeset viewer.