fix: menu manager allow visit

This commit is contained in:
vilet.yy 2021-03-30 17:27:50 +08:00
parent 8952f6a944
commit 9394d15752
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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!