组织团队权限

This commit is contained in:
caishi 2021-08-27 10:53:00 +08:00
parent d8ab7c0759
commit e7fd980116
4 changed files with 19 additions and 5 deletions

View File

@ -384,7 +384,7 @@ function CoderDepot(props){
</AlignCenter>
</FlexAJ>
{
(dirInfo && dirInfo.length>0) || (fileInfo && fileInfo.length>0) ?
(dirInfo && dirInfo.length>0) || fileInfo ?
<div className="listtable">
{
lastCommit &&
@ -426,7 +426,7 @@ function CoderDepot(props){
})
}
{
fileInfo && fileInfo.length > 0 &&
fileInfo &&
<CoderRootFileDetail
{...props}
detail={fileInfo}

View File

@ -77,7 +77,11 @@ function CollaboratorGroup({ newGroupId, owner, projectsId , setAddOperation })
title: "团队名",
dataIndex: "name",
render: (value, item) => {
return <Link to={`/organize/${owner}/group/${item.id}`}>{value}</Link>;
if(item.is_admin || item.is_member){
return <Link to={`/organize/${owner}/group/${item.id}`}>{value}</Link>;
}else{
return <span>{value}</span>;
}
},
},
{

View File

@ -97,7 +97,12 @@ function RightBox({ OIdentifier , history , admin }) {
return(
<div className="teammembers" key={key}>
<div>
<Link to={`/organize/${OIdentifier}/group/${item.id}`}><ColorListName>{item.name}</ColorListName></Link>
{
(item.is_admin || item.is_member) ?
<Link to={`/organize/${OIdentifier}/group/${item.id}`}><ColorListName>{item.name}</ColorListName></Link>
:
<ColorListName>{item.name}</ColorListName>
}
<Align>
<Span>{item.num_users}名成员</Span>
<Span>{item.num_projects}个仓库</Span>

View File

@ -75,7 +75,12 @@ function TeamGroupItems({organizeDetail,limit, count , history}){
return(
<div key={key}>
<p className="g-head">
<Link to={`/organize/${organizeDetail.name}/group/${item.id}`} className="color-grey-3 font-16">{item.nickname}</Link>
{
(item.is_admin || item.is_member) ?
<Link to={`/organize/${organizeDetail.name}/group/${item.id}`} className="color-grey-3 font-16">{item.nickname}</Link>
:
<span className="color-grey-3 font-16">{item.nickname}</span>
}
<span>
{ item.is_admin && item.authorize!=="owner" && <Popconfirm title={`确定解散团队${item.name}?`} okText="是" cancelText="否" onConfirm={()=>disMissGroup(item.id)}><a className="color-red">解散团队</a></Popconfirm>}
{ item.is_member && <LeaveTeam className="ml15" teamID={item.id} onOk={outTeam}/>}