Changeset abb87eb


Ignore:
Timestamp:
Oct 17, 2008 9:52:04 AM (16 years ago)
Author:
Ted Faber <faber@…>
Branches:
axis_example, compt_changes, info-ops, master, version-1.30, version-2.00, version-3.01, version-3.02
Children:
4700b3b
Parents:
3925b50
Message:

split acces to service and experiment access

Location:
fedd
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • fedd/fedd_access.py

    r3925b50 rabb87eb  
    435435                            "Access denied (nodetypes %s)" % \
    436436                            str(', ').join(inaccessible))
    437 
    438             ssh = [ x['sshPubkey'] \
    439                     for x in req['access'] if x.has_key('sshPubkey')]
     437            # XXX: This allocates a single user for both service and creation.
     438            # This needs to be made more nuanced.
     439            tmp_ssh = [ x['sshPubkey'] \
     440                    for x in req['serviceAccess'] + req['createAccess'] \
     441                        if x.has_key('sshPubkey')]
     442
     443            # Converting to a set collapses duplicates
     444            ssh = set(tmp_ssh)
    440445
    441446            if len(ssh) > 0:
  • fedd/fedd_experiment_control.py

    r3925b50 rabb87eb  
    815815        }
    816816
    817         # XXX multi-level access
    818817        uri = self.tbmap.get(tb, None)
    819818        if not uri:
     
    826825                'user':  user,
    827826                'allocID' : { 'localname': 'test' },
    828                 'access' : [ { 'sshPubkey' : self.ssh_pubkey } ]
     827                # XXX: need to get service access stright
     828                'createAccess' : [ { 'sshPubkey' : self.ssh_pubkey } ],
     829                'serviceAccess' : [ { 'sshPubkey' : self.ssh_pubkey } ]
    829830            }
    830831       
  • fedd/fedd_types.xsd

    r3925b50 rabb87eb  
    6868  </xsd:complexType>
    6969
     70  <xsd:simpleType name="userRole">
     71    <xsd:annotation>
     72      <xsd:documentation>
     73        Purpose of this user - service access or experiment creation
     74      </xsd:documentation>
     75    </xsd:annotation>
     76    <xsd:restriction base="xsd:string">
     77      <xsd:enumeration value="serviceAccess"/>
     78      <xsd:enumeration value="experimentCreation"/>
     79    </xsd:restriction>
     80  </xsd:simpleType>
     81
     82
    7083  <xsd:complexType name="userType">
    7184    <xsd:annotation>
     
    8093      <xsd:element name="access" type="tns:accessType" minOccurs="0"
    8194        maxOccurs="unbounded"/>
     95      <xsd:element name="role" type="tns:userRole" minOccurs="0" maxOccurs="1"/>
    8296    </xsd:sequence>
    8397  </xsd:complexType>
     
    294308      <xsd:element name="resources" type="tns:resourcesType" minOccurs="0"
    295309        maxOccurs="1"/>
    296       <xsd:element name="access" type="tns:accessType" minOccurs="1"
     310      <xsd:element name="createAccess" type="tns:accessType" minOccurs="1"
     311        maxOccurs="unbounded"/>
     312      <xsd:element name="serviceAccess" type="tns:accessType" minOccurs="1"
    297313        maxOccurs="unbounded"/>
    298314      <xsd:element name="allocID" type="tns:IDType"/>
Note: See TracChangeset for help on using the changeset viewer.