Browse Source

fix: menu manager allow visit

tags/v3.0.2
vilet.yy 5 years ago
parent
commit
9394d15752
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/controllers/projects/project_units_controller.rb
  2. +1
    -1
      app/controllers/projects_controller.rb

+ 1
- 1
app/controllers/projects/project_units_controller.rb 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


+ 1
- 1
app/controllers/projects_controller.rb 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!


Loading…
Cancel
Save