mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
[ADD]组织项目相关
This commit is contained in:
12
app/controllers/owners_controller.rb
Normal file
12
app/controllers/owners_controller.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
class OwnersController < ApplicationController
|
||||
before_action :require_login
|
||||
|
||||
def index
|
||||
@owners = []
|
||||
@owners += [current_user]
|
||||
@owners += Organization.joins(team_users: :team)
|
||||
.where(team_users: {user_id: current_user.id},
|
||||
teams: {can_create_org_project: true})
|
||||
.distinct
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user