File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/components/ChallengeEditor/Resources Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -183,9 +183,11 @@ export default class Resources extends React.Component {
183
183
) {
184
184
if (
185
185
// Copilots can't delete themselves from the challenge
186
+ // where the copilot has multiple roles, we should allow the additional roles to be deleted, but not the copilot role
186
187
loggedInUserResource &&
187
188
_ . some ( loggedInUserResource . roles , ( role ) => `${ role } ` . toLowerCase ( ) . indexOf ( 'copilot' ) >= 0 ) &&
188
- loggedInUserResource . memberHandle === resourceItem . memberHandle
189
+ loggedInUserResource . memberHandle === resourceItem . memberHandle &&
190
+ `${ resourceItem . role } ` . toLowerCase ( ) . indexOf ( 'copilot' ) >= 0
189
191
) {
190
192
exceptionResourceIdDeleteList [ resourceItem . id ] = true
191
193
}
You can’t perform that action at this time.
0 commit comments