#1468 V20220125.patch.1合入V20220125

Merged
lewis merged 5 commits from V20220125.patch.1 into V20220125 2 years ago
  1. +18
    -1
      services/socketwrap/clientManager.go
  2. +3
    -2
      templates/explore/repo_orgtop.tmpl

+ 18
- 1
services/socketwrap/clientManager.go View File

@@ -50,7 +50,7 @@ func (h *ClientsManager) Run() {
}
case message := <-models.ActionChan:
if isInOpTypes(opTypes, message.OpType) {
message.Comment = nil
filterUserPrivateInfo(message)
LastActionsQueue.Push(message)
for _, client := range h.Clients.Keys() {
select {
@@ -95,6 +95,7 @@ func initActionQueue() {
user, err := models.GetUserByID(actions[i].UserID)
if err == nil {
if !user.IsOrganization() {
filterUserPrivateInfo(actions[i])
LastActionsQueue.Push(actions[i])
}

@@ -103,3 +104,19 @@ func initActionQueue() {
}
}
}

func filterUserPrivateInfo(action *models.Action) {
action.Comment = nil
action.ActUser.Email = ""
action.ActUser.Passwd = ""
action.ActUser.PasswdHashAlgo = ""
action.ActUser.PrivateKey = ""
action.ActUser.PublicKey = ""
action.ActUser.Salt = ""
action.ActUser.FullName = ""
action.ActUser.AvatarEmail = ""
action.ActUser.IsAdmin = false
action.ActUser.EmailNotificationsPreference = ""
action.ActUser.IsOperator = false

}

+ 3
- 2
templates/explore/repo_orgtop.tmpl View File

@@ -1,5 +1,6 @@
<script src="https://cdn.bootcdn.net/ajax/libs/Swiper/6.8.0/swiper-bundle.min.js"></script>
<link href="https://cdn.bootcdn.net/ajax/libs/Swiper/6.8.0/swiper-bundle.min.css" rel="stylesheet">
<script src="/swiper/swiper-bundle.min.js"></script>
<link href="/swiper/swiper-bundle.min.css" rel="stylesheet">

<style>
.explore .repos--seach{
border-bottom:none;


Loading…
Cancel
Save