add: project menulist resources

This commit is contained in:
vilet.yy 2021-04-06 17:26:48 +08:00
parent d6c3bcfaf1
commit cf224bc9fe
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@ class ProjectsController < ApplicationController
menu.append(menu_hash_by_name("pulls")) if @project.has_menu_permission("pulls")
menu.append(menu_hash_by_name("devops")) if @project.has_menu_permission("devops")
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)

View File

@ -16,7 +16,7 @@
class ProjectUnit < ApplicationRecord
belongs_to :project
enum unit_type: {code: 1, issues: 2, pulls: 3, devops: 4, versions: 5}
enum unit_type: {code: 1, issues: 2, pulls: 3, devops: 4, versions: 5, resources: 6}
validates :unit_type, uniqueness: { scope: :project_id}