mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-11 15:25:56 +08:00
fix: menu manager allow visit
This commit is contained in:
@@ -4,7 +4,7 @@ class Projects::ProjectUnitsController < Projects::BaseController
|
||||
end
|
||||
|
||||
def create
|
||||
if current_user.admin? || @project.owner?(current_user)
|
||||
if current_user.admin? || @project.manager?(current_user)
|
||||
ActiveRecord::Base.transaction do
|
||||
ProjectUnit.update_by_unit_types!(@project, unit_types)
|
||||
render_ok
|
||||
|
||||
@@ -111,7 +111,7 @@ class ProjectsController < ApplicationController
|
||||
end
|
||||
|
||||
def destroy
|
||||
if current_user.admin? || @project.owner?(current_user)
|
||||
if current_user.admin? || @project.manager?(current_user)
|
||||
ActiveRecord::Base.transaction do
|
||||
Gitea::Repository::DeleteService.new(@project.owner, @project.identifier).call
|
||||
@project.destroy!
|
||||
|
||||
Reference in New Issue
Block a user