|
|
@@ -845,6 +845,15 @@ class User < Owner |
|
|
end |
|
|
end |
|
|
end |
|
|
end |
|
|
|
|
|
|
|
|
|
|
|
# 重写gitea_token,当用户为bot类型时,替换成管理员token |
|
|
|
|
|
def gitea_token |
|
|
|
|
|
if self.platform == "bot" |
|
|
|
|
|
GiteaService.gitea_config[:admin_token] |
|
|
|
|
|
else |
|
|
|
|
|
self['gitea_token'] |
|
|
|
|
|
end |
|
|
|
|
|
end |
|
|
|
|
|
|
|
|
protected |
|
|
protected |
|
|
def validate_password_length |
|
|
def validate_password_length |
|
|
# 管理员的初始密码是5位 |
|
|
# 管理员的初始密码是5位 |
|
|
|