forgeplus/app/controllers/projects/base_controller.rb

11 lines
293 B
Ruby
Raw Normal View History

2020-03-09 00:40:16 +08:00
class Projects::BaseController < ApplicationController
include PaginateHelper
2020-08-11 23:20:04 +08:00
before_action :load_project
before_action :load_repository
2021-07-27 11:11:23 +08:00
def require_manager!
return render_forbidden('你没有权限操作') unless current_user.admin? || @project.manager?(current_user)
end
2020-03-09 00:40:16 +08:00
end