mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-07-13 21:44:32 +08:00
FIX 重构项目管理权限
This commit is contained in:
@@ -1,4 +1,10 @@
|
||||
module RepositoriesHelper
|
||||
def render_permission(user, project)
|
||||
return "Admin" if user&.admin?
|
||||
return "Owner" if user === project.owner
|
||||
project.get_premission(user)
|
||||
end
|
||||
|
||||
def render_decode64_content(str)
|
||||
return nil if str.blank?
|
||||
Base64.decode64(str).force_encoding("UTF-8")
|
||||
@@ -44,7 +50,7 @@ module RepositoriesHelper
|
||||
end
|
||||
if r_content.include?("?")
|
||||
new_r_content = r_content + "&raw=true"
|
||||
else
|
||||
else
|
||||
new_r_content = r_content + "?raw=true"
|
||||
end
|
||||
unless r_content.include?("http://") || r_content.include?("https://") || r_content.include?("mailto:")
|
||||
|
||||
Reference in New Issue
Block a user