- Timestamp:
- Nov 26, 2008 3:10:47 PM (16 years ago)
- Branches:
- axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
- Children:
- 93a06fb
- Parents:
- c7e40f5
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
fedd/fedd_access.py
rc7e40f5 r40eab39 38 38 class parse_error(RuntimeError): pass 39 39 40 bool_attrs = (" dynamic_projects", "project_priority", "allow_proxy")40 bool_attrs = ("project_priority", "allow_proxy") 41 41 emulab_attrs = ("boss", "ops", "domain", "fileserver", "eventserver") 42 42 id_attrs = ("testbed", "proxy", 43 43 "proxy_cert_file", "proxy_cert_pwd", "proxy_trusted_certs", 44 " dynamic_projects_url", "dynamic_projects_cert_file",45 " dynamic_projects_cert_pwd", "dynamic_projects_trusted_certs")44 "project_allocation_uri", "project_allocation_cert_file", 45 "project_allocation_cert_pwd", "project_allocation_trusted_certs") 46 46 id_list_attrs = ("restricted",) 47 47 … … 117 117 118 118 if config.has_option("globals", "proxy_cert_file"): 119 if not self. dynamic_projects_cert_file:120 self. dynamic_projects_cert_file = \119 if not self.project_allocation_cert_file: 120 self.project_allocation_cert_file = \ 121 121 config.get("globals", "proxy_cert_file") 122 122 if config.has_option("globals", "proxy_cert_pwd"): 123 self. dynamic_projects_cert_pwd = \123 self.project_allocation_cert_pwd = \ 124 124 config.get("globals", "proxy_cert_pwd") 125 125 126 126 if config.has_option("globals", "proxy_trusted_certs"): 127 if not self. dynamic_projects_trusted_certs:128 self. dynamic_projects_trusted_certs =\127 if not self.project_allocation_trusted_certs: 128 self.project_allocation_trusted_certs =\ 129 129 config.get("globals", proxy_trusted_certs) 130 130 131 131 if config.has_option("globals", "cert_file"): 132 132 has_pwd = config.has_option("globals", "cert_pwd") 133 if not self. dynamic_projects_cert_file:134 self. dynamic_projects_cert_file = \133 if not self.project_allocation_cert_file: 134 self.project_allocation_cert_file = \ 135 135 config.get("globals", "cert_file") 136 136 if has_pwd: 137 self. dynamic_projects_cert_pwd = \137 self.project_allocation_cert_pwd = \ 138 138 config.get("globals", "cert_pwd") 139 139 if not self.proxy_cert_file: … … 146 146 self.proxy_trusted_certs = \ 147 147 config.get("globals", "trusted_certs") 148 if not self. dynamic_projects_trusted_certs:149 self. dynamic_projects_trusted_certs = \148 if not self.project_allocation_trusted_certs: 149 self.project_allocation_trusted_certs = \ 150 150 config.get("globals", "trusted_certs") 151 151 152 proj_certs = (self. dynamic_projects_cert_file,153 self. dynamic_projects_trusted_certs,154 self. dynamic_projects_cert_pwd)152 proj_certs = (self.project_allocation_cert_file, 153 self.project_allocation_trusted_certs, 154 self.project_allocation_cert_pwd) 155 155 156 156 self.soap_services = {\ … … 172 172 173 173 174 if not config.has_option("access", " dynamic_projects_url"):174 if not config.has_option("access", "project_allocation_uri"): 175 175 self.allocate_project = \ 176 176 fedd_allocate_project_local(config, auth) … … 451 451 # Confirm authorization 452 452 for u in user: 453 self.log.debug("[lookup_access] Checking access for %s" % \ 454 ((tb, project, u),)) 453 455 if self.auth.check_attribute((tb, project, u), 'access'): 456 self.log.debug("[lookup_access] Access granted") 454 457 break 458 else: 459 self.log.debug("[lookup_access] Access Denied") 455 460 else: 456 461 raise service_error(service_error.access, "Access denied") … … 582 587 "Access denied (nodetypes %s)" % \ 583 588 str(', ').join(inaccessible)) 584 # These collect the keys for t ehtwo roles into single sets, one589 # These collect the keys for the two roles into single sets, one 585 590 # for creation and one for service. The sets are a simple way to 586 591 # eliminate duplicates … … 618 623 [ {'node': { 'hardware' : [ h ] } } \ 619 624 for h in restricted ] 620 621 625 ap = self.allocate_project.dynamic_project(preq) 622 626 else:
Note: See TracChangeset
for help on using the changeset viewer.