Subversion Repositories SmartDukaan

Rev

Rev 6322 | Rev 7221 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6322 Rev 6788
Line 170... Line 170...
170
    Parameters:
170
    Parameters:
171
     - role
171
     - role
172
    """
172
    """
173
    pass
173
    pass
174
 
174
 
175
  def authenticateCatalogUser(self, username, password, role):
175
  def authenticateCatalogUser(self, username, password):
176
    """
176
    """
177
    Returns the CatalogDashboardUser struct associated with the given username, password and role if they match.
177
    Returns the CatalogDashboardUser struct associated with the given username, password and role if they match.
178
    Throws an exception otherwise.
178
    Throws an exception otherwise.
179
 
179
 
180
    Parameters:
180
    Parameters:
181
     - username
181
     - username
182
     - password
182
     - password
183
     - role
-
 
184
    """
183
    """
185
    pass
184
    pass
186
 
185
 
187
  def shareEntities(self, entityIds, email):
186
  def shareEntities(self, entityIds, email):
188
    """
187
    """
Line 851... Line 850...
851
    self._iprot.readMessageEnd()
850
    self._iprot.readMessageEnd()
852
    if result.success is not None:
851
    if result.success is not None:
853
      return result.success
852
      return result.success
854
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReports failed: unknown result");
853
    raise TApplicationException(TApplicationException.MISSING_RESULT, "getReports failed: unknown result");
855
 
854
 
856
  def authenticateCatalogUser(self, username, password, role):
855
  def authenticateCatalogUser(self, username, password):
857
    """
856
    """
858
    Returns the CatalogDashboardUser struct associated with the given username, password and role if they match.
857
    Returns the CatalogDashboardUser struct associated with the given username, password and role if they match.
859
    Throws an exception otherwise.
858
    Throws an exception otherwise.
860
 
859
 
861
    Parameters:
860
    Parameters:
862
     - username
861
     - username
863
     - password
862
     - password
864
     - role
-
 
865
    """
863
    """
866
    self.send_authenticateCatalogUser(username, password, role)
864
    self.send_authenticateCatalogUser(username, password)
867
    return self.recv_authenticateCatalogUser()
865
    return self.recv_authenticateCatalogUser()
868
 
866
 
869
  def send_authenticateCatalogUser(self, username, password, role):
867
  def send_authenticateCatalogUser(self, username, password):
870
    self._oprot.writeMessageBegin('authenticateCatalogUser', TMessageType.CALL, self._seqid)
868
    self._oprot.writeMessageBegin('authenticateCatalogUser', TMessageType.CALL, self._seqid)
871
    args = authenticateCatalogUser_args()
869
    args = authenticateCatalogUser_args()
872
    args.username = username
870
    args.username = username
873
    args.password = password
871
    args.password = password
874
    args.role = role
-
 
875
    args.write(self._oprot)
872
    args.write(self._oprot)
876
    self._oprot.writeMessageEnd()
873
    self._oprot.writeMessageEnd()
877
    self._oprot.trans.flush()
874
    self._oprot.trans.flush()
878
 
875
 
879
  def recv_authenticateCatalogUser(self, ):
876
  def recv_authenticateCatalogUser(self, ):
Line 1520... Line 1517...
1520
    args = authenticateCatalogUser_args()
1517
    args = authenticateCatalogUser_args()
1521
    args.read(iprot)
1518
    args.read(iprot)
1522
    iprot.readMessageEnd()
1519
    iprot.readMessageEnd()
1523
    result = authenticateCatalogUser_result()
1520
    result = authenticateCatalogUser_result()
1524
    try:
1521
    try:
1525
      result.success = self._handler.authenticateCatalogUser(args.username, args.password, args.role)
1522
      result.success = self._handler.authenticateCatalogUser(args.username, args.password)
1526
    except HelperServiceException, hse:
1523
    except HelperServiceException, hse:
1527
      result.hse = hse
1524
      result.hse = hse
1528
    oprot.writeMessageBegin("authenticateCatalogUser", TMessageType.REPLY, seqid)
1525
    oprot.writeMessageBegin("authenticateCatalogUser", TMessageType.REPLY, seqid)
1529
    result.write(oprot)
1526
    result.write(oprot)
1530
    oprot.writeMessageEnd()
1527
    oprot.writeMessageEnd()
Line 4095... Line 4092...
4095
class authenticateCatalogUser_args:
4092
class authenticateCatalogUser_args:
4096
  """
4093
  """
4097
  Attributes:
4094
  Attributes:
4098
   - username
4095
   - username
4099
   - password
4096
   - password
4100
   - role
-
 
4101
  """
4097
  """
4102
 
4098
 
4103
  thrift_spec = (
4099
  thrift_spec = (
4104
    None, # 0
4100
    None, # 0
4105
    (1, TType.STRING, 'username', None, None, ), # 1
4101
    (1, TType.STRING, 'username', None, None, ), # 1
4106
    (2, TType.STRING, 'password', None, None, ), # 2
4102
    (2, TType.STRING, 'password', None, None, ), # 2
4107
    (3, TType.I64, 'role', None, None, ), # 3
-
 
4108
  )
4103
  )
4109
 
4104
 
4110
  def __init__(self, username=None, password=None, role=None,):
4105
  def __init__(self, username=None, password=None,):
4111
    self.username = username
4106
    self.username = username
4112
    self.password = password
4107
    self.password = password
4113
    self.role = role
-
 
4114
 
4108
 
4115
  def read(self, iprot):
4109
  def read(self, iprot):
4116
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4110
    if iprot.__class__ == TBinaryProtocol.TBinaryProtocolAccelerated and isinstance(iprot.trans, TTransport.CReadableTransport) and self.thrift_spec is not None and fastbinary is not None:
4117
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4111
      fastbinary.decode_binary(self, iprot.trans, (self.__class__, self.thrift_spec))
4118
      return
4112
      return
Line 4129... Line 4123...
4129
      elif fid == 2:
4123
      elif fid == 2:
4130
        if ftype == TType.STRING:
4124
        if ftype == TType.STRING:
4131
          self.password = iprot.readString();
4125
          self.password = iprot.readString();
4132
        else:
4126
        else:
4133
          iprot.skip(ftype)
4127
          iprot.skip(ftype)
4134
      elif fid == 3:
-
 
4135
        if ftype == TType.I64:
-
 
4136
          self.role = iprot.readI64();
-
 
4137
        else:
-
 
4138
          iprot.skip(ftype)
-
 
4139
      else:
4128
      else:
4140
        iprot.skip(ftype)
4129
        iprot.skip(ftype)
4141
      iprot.readFieldEnd()
4130
      iprot.readFieldEnd()
4142
    iprot.readStructEnd()
4131
    iprot.readStructEnd()
4143
 
4132
 
Line 4152... Line 4141...
4152
      oprot.writeFieldEnd()
4141
      oprot.writeFieldEnd()
4153
    if self.password is not None:
4142
    if self.password is not None:
4154
      oprot.writeFieldBegin('password', TType.STRING, 2)
4143
      oprot.writeFieldBegin('password', TType.STRING, 2)
4155
      oprot.writeString(self.password)
4144
      oprot.writeString(self.password)
4156
      oprot.writeFieldEnd()
4145
      oprot.writeFieldEnd()
4157
    if self.role is not None:
-
 
4158
      oprot.writeFieldBegin('role', TType.I64, 3)
-
 
4159
      oprot.writeI64(self.role)
-
 
4160
      oprot.writeFieldEnd()
-
 
4161
    oprot.writeFieldStop()
4146
    oprot.writeFieldStop()
4162
    oprot.writeStructEnd()
4147
    oprot.writeStructEnd()
4163
 
4148
 
4164
  def validate(self):
4149
  def validate(self):
4165
    return
4150
    return