diff --git a/app/controllers/site_pages_controller.rb b/app/controllers/site_pages_controller.rb index 319cacfb5..8f6b9af51 100644 --- a/app/controllers/site_pages_controller.rb +++ b/app/controllers/site_pages_controller.rb @@ -10,13 +10,13 @@ class SitePagesController < ApplicationController end def show - @page = Page.find_by(user_id: current_user.id, project_id: @project.id) + @page = Page.find_by(project_id: @project.id) return render_ok({data:nil}) unless @page.present? end def create - return normal_status(-1, "您还未通过身份认证,无法开通Page") unless current_user.id_card_verify - return normal_status(-1, "您还未开通Page服务,无法进行部署") unless current_user.website_permission + return normal_status(-1, "你还未通过身份认证,无法开通Page") unless current_user.id_card_verify + return normal_status(-1, "你还未开通Page服务,无法进行部署") unless current_user.website_permission return normal_status(-1, "你已使用了 #{params[:identifier]} 作为page标识") if Page.exists?(identifier: params[:identifier], user: current_user) return normal_status(-1, "该仓库已开通Page服务") if Page.exists?(project: @project) @page = Page.new(create_params) @@ -26,7 +26,7 @@ class SitePagesController < ApplicationController end def build - return normal_status(-1, "您还未开通Page服务,无法进行部署") unless current_user.website_permission + return normal_status(-1, "你还未开通Page服务,无法进行部署") unless current_user.website_permission return normal_status(-1, "该仓库还未开通Page服务,无法进行部署") unless Page.exists?(project: @project) @page = Page.find params[:id] return normal_status(-1, @page.state_description) unless @page.state @@ -42,7 +42,7 @@ class SitePagesController < ApplicationController def softbot_build branch = params[:ref].split("/").last user = User.find_by_login params[:repository][:owner][:login] - return normal_status(-1, "您还未开通Page服务,无法进行部署") unless user.website_permission + return normal_status(-1, "你还未开通Page服务,无法进行部署") unless user.website_permission project = Project.where(identifier: params[:repository][:name],user_id: user.id) return normal_status(-1, "你没有权限操作") if project.owner?(user) @@ -60,9 +60,9 @@ class SitePagesController < ApplicationController private def authenticate_user! - return if @project.is_public - return if @project.owner?(current_user) - render_forbidden('你没有权限操作') + unless @project.manager?(current_user) || current_user.admin? + return render_forbidden('你不是管理员,没有权限操作') + end end def theme_params diff --git a/app/views/admins/identity_verifications/edit.html.erb b/app/views/admins/identity_verifications/edit.html.erb index 4719b01f0..eff4fbd08 100644 --- a/app/views/admins/identity_verifications/edit.html.erb +++ b/app/views/admins/identity_verifications/edit.html.erb @@ -1,6 +1,6 @@ <% define_admin_breadcrumbs do - add_admin_breadcrumb('用户管理', admins_identity_verifications_path) + add_admin_breadcrumb('身份审核列表', admins_identity_verifications_path) add_admin_breadcrumb('用户身份审核详情') end %> @@ -62,7 +62,7 @@
图片无法展示,图片已丢失
<%end%> @@ -72,7 +72,7 @@图片无法展示,图片已丢失
<%end%> @@ -82,7 +82,7 @@图片无法展示,图片已丢失
<%end%> @@ -92,23 +92,20 @@图片无法展示,图片已丢失
<%end%>用户身份审核已通过
-