用户若登录成功, 则授权.
(user string)
| 76 | |
| 77 | // 用户若登录成功, 则授权. |
| 78 | func AuthorizeUser(user string) bool { |
| 79 | USER_LOCK_MU.Lock() |
| 80 | defer USER_LOCK_MU.Unlock() |
| 81 | if _, ok := USER_LOCK[user]; ok { |
| 82 | return USER_LOCK[user] |
| 83 | } else { |
| 84 | USER_LOCK[user] = (LOGIN_PASSWORD != "") |
| 85 | return USER_LOCK[user] |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | |
| 90 | // 授权文件传输服务中间件. |
no outgoing calls
no test coverage detected