@@ -1253,16 +1253,16 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
1253
1253
if ! poster .IsAdmin {
1254
1254
roleDescriptor = roleDescriptor .WithRole (issues_model .RoleDescriptorOwner )
1255
1255
return roleDescriptor , nil
1256
- } else {
1257
- // Otherwise check if poster is the real repo admin.
1258
- ok , err := access_model . IsUserRealRepoAdmin ( repo , poster )
1259
- if err != nil {
1260
- return issues_model . RoleDescriptorNone , err
1261
- }
1262
- if ok {
1263
- roleDescriptor = roleDescriptor . WithRole ( issues_model . RoleDescriptorOwner )
1264
- return roleDescriptor , nil
1265
- }
1256
+ }
1257
+
1258
+ // Otherwise check if poster is the real repo admin.
1259
+ ok , err := access_model . IsUserRealRepoAdmin ( repo , poster )
1260
+ if err != nil {
1261
+ return issues_model . RoleDescriptorNone , err
1262
+ }
1263
+ if ok {
1264
+ roleDescriptor = roleDescriptor . WithRole ( issues_model . RoleDescriptorOwner )
1265
+ return roleDescriptor , nil
1266
1266
}
1267
1267
}
1268
1268
@@ -1280,7 +1280,7 @@ func roleDescriptor(ctx stdCtx.Context, repo *repo_model.Repository, poster *use
1280
1280
}
1281
1281
1282
1282
// If the poster is the collaborator of the repo
1283
- if isCollaborator , err := repo_model .IsCollaborator (ctx , repo .ID , poster .ID ); err != err {
1283
+ if isCollaborator , err := repo_model .IsCollaborator (ctx , repo .ID , poster .ID ); err != nil {
1284
1284
return issues_model .RoleDescriptorNone , err
1285
1285
} else if isCollaborator {
1286
1286
roleDescriptor = roleDescriptor .WithRole (issues_model .RoleDescriptorCollaborator )
0 commit comments