This website works better with JavaScript.
Home
Issues
Pull Requests
Milestones
AI流水线
Repositories
Datasets
Forum
实训
竞赛
大数据
AI开发
Register
Sign In
Gitlink
/
forgeplus
Not watched
Unwatch
Watch all
Watch but not notify
1
Star
0
Fork
0
Code
Releases
16
Wiki
evaluate
Activity
Issues
0
Pull Requests
0
Datasets
Model
Cloudbrain
HPC
Browse Source
重写user.gitea_token,当用户为bot类型时,替换成管理员token
pull/342/head
xxq250
3 years ago
parent
76028a71f0
commit
007edd38be
1 changed files
with
9 additions
and
0 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+9
-0
app/models/user.rb
+ 9
- 0
app/models/user.rb
View File
@@ -845,6 +845,15 @@ class User < Owner
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
def validate_password_length
# 管理员的初始密码是5位
Write
Preview
Loading…
Cancel
Save