add: change project menu authorize

This commit is contained in:
2021-09-03 09:37:30 +08:00
parent 784521e58a
commit e9915cb654
4 changed files with 16 additions and 4 deletions

View File

@@ -22,7 +22,7 @@ class ProjectsController < ApplicationController
menu.append(menu_hash_by_name("versions")) if @project.has_menu_permission("versions")
menu.append(menu_hash_by_name("resources")) if @project.has_menu_permission("resources")
menu.append(menu_hash_by_name("activity"))
menu.append(menu_hash_by_name("setting")) if current_user.admin? || @project.manager?(current_user)
menu.append(menu_hash_by_name("settings")) if current_user.admin? || @project.manager?(current_user)
render json: menu
end