opti: 没有权限的分组禁用掉

This commit is contained in:
zwjamnsss 2017-09-15 17:42:01 +08:00
parent e1b285636b
commit 9c487d8226

View File

@ -131,7 +131,9 @@ class ProjectList extends Component {
}]
})(
<Select>
{this.state.groupList.map((item, index) => <Option value={item._id.toString()} key={index}>{item.group_name}</Option>)}
{this.state.groupList.map((item, index) => (
<Option disabled={!(item.role === 'dev' || item.role === 'owner')} value={item._id.toString()} key={index}>{item.group_name}</Option>
))}
</Select>
)}
</FormItem>