Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 0d1747d

Browse files
共有项目没有权限管理,非项目成员也可访问代码相关功能
1 parent a6c9b64 commit 0d1747d

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

‎Coding_iOS/Controllers/NProjectViewController/NProjectViewController.m‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,9 +234,9 @@ - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPa
234234
cellHeight = indexPath.row == 0? [ProjectInfoCell cellHeight]: [ProjectDescriptionCell cellHeightWithObj:_myProject];
235235
}else if (indexPath.section == 1){
236236
NSInteger codeNum = _myProject.is_public.boolValue? 2: 4;
237-
cellHeight = (indexPath.row == codeNum && _myProject.current_user_role_id.integerValue <= 75)? 0: [NProjectItemCell cellHeight];
237+
cellHeight = (indexPath.row == codeNum && !_myProject.is_public.boolValue && _myProject.current_user_role_id.integerValue <= 75)? 0: [NProjectItemCell cellHeight];
238238
}else{
239-
cellHeight = _myProject.current_user_role_id.integerValue <= 75? 0: [NProjectItemCell cellHeight];
239+
cellHeight = (!_myProject.is_public.boolValue && _myProject.current_user_role_id.integerValue <= 75)? 0: [NProjectItemCell cellHeight];
240240
}
241241
return cellHeight;
242242
}

‎Coding_iOS/Controllers/ProjectMemberActivityListViewController.m‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ - (void)goToVCWithItem:(HtmlMediaItem *)clickedItem activity:(ProjectActivity *)
169169
}
170170
}else if ([proAct.action isEqualToString:@"push"]){
171171
// current_user_role_id = 75 是受限成员,不可访问代码
172-
if (project.current_user_role_id.integerValue <= 75) {
172+
if (!project.is_public.boolValue && project.current_user_role_id.integerValue <= 75) {
173173
[NSObject showHudTipStr:@"无权访问项目代码相关功能"];
174174
return;
175175
}
@@ -193,7 +193,7 @@ - (void)goToVCWithItem:(HtmlMediaItem *)clickedItem activity:(ProjectActivity *)
193193
[target_type isEqualToString:@"MergeRequestBean"] ||
194194
[target_type isEqualToString:@"CommitLineNote"]){
195195
// current_user_role_id = 75 是受限成员,不可访问代码
196-
if (project.current_user_role_id.integerValue <= 75) {
196+
if (!project.is_public.boolValue && project.current_user_role_id.integerValue <= 75) {
197197
[NSObject showHudTipStr:@"无权访问项目代码相关功能"];
198198
return;
199199
}

‎Coding_iOS/Controllers/ProjectViewController.m‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ - (void)goToVCWithItem:(HtmlMediaItem *)clickedItem activity:(ProjectActivity *)
442442
}
443443
}else if ([proAct.action isEqualToString:@"push"]){
444444
// current_user_role_id = 75 是受限成员,不可访问代码
445-
if (project.current_user_role_id.integerValue <= 75) {
445+
if (!project.is_public.boolValue && project.current_user_role_id.integerValue <= 75) {
446446
[NSObject showHudTipStr:@"无权访问项目代码相关功能"];
447447
return;
448448
}
@@ -466,7 +466,7 @@ - (void)goToVCWithItem:(HtmlMediaItem *)clickedItem activity:(ProjectActivity *)
466466
[target_type isEqualToString:@"MergeRequestBean"] ||
467467
[target_type isEqualToString:@"CommitLineNote"]){
468468
// current_user_role_id = 75 是受限成员,不可访问代码
469-
if (project.current_user_role_id.integerValue <= 75) {
469+
if (!project.is_public.boolValue && project.current_user_role_id.integerValue <= 75) {
470470
[NSObject showHudTipStr:@"无权访问项目代码相关功能"];
471471
return;
472472
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /