mirror of
https://github.com/YMFE/yapi.git
synced 2025-01-30 13:20:24 +08:00
fix: 访客权限
This commit is contained in:
parent
cf825851f7
commit
d3f9fc6945
@ -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>
|
||||
|
@ -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, '没有权限');
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user