fix: 访客权限

This commit is contained in:
zwjamnsss 2017-09-21 17:39:40 +08:00
parent cf825851f7
commit d3f9fc6945
2 changed files with 2 additions and 1 deletions

View File

@ -241,6 +241,7 @@ class ProjectMember extends Component {
<p className="item-name">{item.username}{item.uid === this.props.uid ? <Badge count={'我'} style={{ backgroundColor: '#689bd0', fontSize: '13px', marginLeft: '8px', borderRadius: '4px' }} /> : null}</p>
{item.role === 'owner' ? <p className="item-role">组长</p> : null}
{item.role === 'dev' ? <p className="item-role">开发者</p> : null}
{item.role === 'guest' ? <p className="item-role">访客</p> : null}
</div>);
}): <ErrMsg type="noMemberInGroup"/>}
</Card>

View File

@ -205,7 +205,7 @@ class interfaceController extends baseController {
let result = await this.Model.get(params.id);
let project = await this.projectModel.getBaseInfo(result.project_id);
if (project.project_type === 'private') {
if (await this.checkAuth(project._id, 'project', 'edit') !== true) {
if (await this.checkAuth(project._id, 'project', 'view') !== true) {
return ctx.body = yapi.commons.resReturn(null, 406, '没有权限');
}
}