Support for adding reviewer role (#22137)
* Support for adding reviewer role * show reviewer in track changes user list * added "review" in assertClientCanViewProject * test if reviewer can read project * added collaboratorsGetter tests * eit toggle-track-changes when track changes changes * Support for changing privilege to reviewers for invited users (#22159) * Add reviewer in change privilege level handler * added reviewer translation * added acceptance tests * fix tests * Set track changes state permissions for reviewer role (#22167) * Add reviewer in change privilege level handler * added reviewer translation * added acceptance tests * fix tests * Set track changes state permissions for reviewer role * added authorization helper tests * added ensureUserCanReviewProjectContent middleware * allow changing track changes only with write permissions * removed canUserReviewProjectContent * List projects where user is added as a reviewer (#22249) * List projects where user is added as reviewer * list projects in /user/projects * fix tests GitOrigin-RevId: 54064a7f961fe06f188ab449cd469cdaaf01b20a
This commit is contained in:
committed by
Copybot
parent
81aab71ffd
commit
f676eca2b8
@@ -275,6 +275,7 @@ describe('ProjectGetter', function () {
|
||||
this.fields = { mock: 'fields' }
|
||||
this.projectOwned = { _id: 'mock-owned-projects' }
|
||||
this.projectRW = { _id: 'mock-rw-projects' }
|
||||
this.projectReview = { _id: 'mock-review-projects' }
|
||||
this.projectRO = { _id: 'mock-ro-projects' }
|
||||
this.projectTokenRW = { _id: 'mock-token-rw-projects' }
|
||||
this.projectTokenRO = { _id: 'mock-token-ro-projects' }
|
||||
@@ -289,6 +290,7 @@ describe('ProjectGetter', function () {
|
||||
readOnly: [this.projectRO],
|
||||
tokenReadAndWrite: [this.projectTokenRW],
|
||||
tokenReadOnly: [this.projectTokenRO],
|
||||
review: [this.projectReview],
|
||||
})
|
||||
const projects = await this.ProjectGetter.promises.findAllUsersProjects(
|
||||
this.userId,
|
||||
@@ -301,6 +303,7 @@ describe('ProjectGetter', function () {
|
||||
readOnly: [this.projectRO],
|
||||
tokenReadAndWrite: [this.projectTokenRW],
|
||||
tokenReadOnly: [this.projectTokenRO],
|
||||
review: [this.projectReview],
|
||||
})
|
||||
})
|
||||
|
||||
@@ -314,6 +317,7 @@ describe('ProjectGetter', function () {
|
||||
this.projectTokenRO,
|
||||
this.projectRO,
|
||||
],
|
||||
review: [this.projectReview],
|
||||
})
|
||||
const projects = await this.ProjectGetter.promises.findAllUsersProjects(
|
||||
this.userId,
|
||||
@@ -326,6 +330,7 @@ describe('ProjectGetter', function () {
|
||||
readOnly: [this.projectRO],
|
||||
tokenReadAndWrite: [this.projectTokenRW],
|
||||
tokenReadOnly: [this.projectTokenRO],
|
||||
review: [this.projectReview],
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user