File tree 1 file changed +10
-0
lines changed
components/server/src/projects
1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,16 @@ export class ProjectsService {
442
442
throw new ApplicationError ( ErrorCodes . NOT_FOUND , `Project ${ partialProject . id } not found.` ) ;
443
443
}
444
444
445
+ // In case we are altering the "enableDockerdAuthentication": require org write_settings permission, so users
446
+ // can't inadvertently share credentials an owner configured
447
+ if (
448
+ partialProject ?. settings ?. enableDockerdAuthentication !==
449
+ existingProject . settings ?. enableDockerdAuthentication &&
450
+ partialProject ?. settings ?. enableDockerdAuthentication
451
+ ) {
452
+ await this . auth . checkPermissionOnOrganization ( user . id , "write_settings" , existingProject . teamId ) ;
453
+ }
454
+
445
455
// Merge settings so that clients don't need to pass previous value all the time
446
456
// (not update setting field if undefined)
447
457
if ( partialProject . settings ) {
You can’t perform that action at this time.
0 commit comments