feat: migrate IM identity and snowflake primary keys
This commit is contained in:
+12
-1
@@ -3071,6 +3071,10 @@ func (t *Topic) replySetTags(sess *Session, asUid types.Uid, msg *ClientComMessa
|
||||
sess.queueOut(ErrOperationNotAllowedReply(msg, now))
|
||||
return errors.New("invalid topic category to assign tags")
|
||||
}
|
||||
if t.cat == types.TopicCatMe {
|
||||
sess.queueOut(ErrOperationNotAllowedReply(msg, now))
|
||||
return errors.New("user tags are no longer supported")
|
||||
}
|
||||
|
||||
if t.cat == types.TopicCatGrp && t.owner != asUid {
|
||||
sess.queueOut(ErrPermissionDeniedReply(msg, now))
|
||||
@@ -3168,7 +3172,6 @@ func (t *Topic) replyGetCreds(sess *Session, asUid types.Uid, msg *ClientComMess
|
||||
sess.queueOut(ErrOperationNotAllowedReply(msg, now))
|
||||
return errors.New("invalid topic category for getting credentials")
|
||||
}
|
||||
|
||||
screds, err := store.Users.GetAllCreds(sess.tenantID, asUid, "", false)
|
||||
if err != nil {
|
||||
sess.queueOut(decodeStoreErrorExplicitTs(err, id, msg.Original, now, msg.Timestamp, nil))
|
||||
@@ -3206,6 +3209,10 @@ func (t *Topic) replySetCred(sess *Session, asUid types.Uid, authLevel auth.Leve
|
||||
sess.queueOut(ErrOperationNotAllowedReply(msg, now))
|
||||
return errors.New("invalid topic category for updating credentials")
|
||||
}
|
||||
if set.Cred.Method == "tel" || set.Cred.Method == "email" {
|
||||
sess.queueOut(ErrOperationNotAllowedReply(msg, now))
|
||||
return errors.New("phone and email are managed by product profile APIs")
|
||||
}
|
||||
|
||||
var err error
|
||||
var tags []string
|
||||
@@ -3484,6 +3491,10 @@ func (t *Topic) replyDelCred(sess *Session, asUid types.Uid, authLvl auth.Level,
|
||||
sess.queueOut(ErrMalformedReply(msg, now))
|
||||
return errors.New("del.cred: missing method")
|
||||
}
|
||||
if del.Cred.Method == "tel" || del.Cred.Method == "email" {
|
||||
sess.queueOut(ErrOperationNotAllowedReply(msg, now))
|
||||
return errors.New("phone and email are managed by product profile APIs")
|
||||
}
|
||||
|
||||
tags, err := deleteCred(sess.tenantID, asUid, authLvl, del.Cred)
|
||||
if tags != nil {
|
||||
|
||||
Reference in New Issue
Block a user