File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed
components/server/src/projects Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -442,6 +442,16 @@ export class ProjectsService {
442442 throw new ApplicationError ( ErrorCodes . NOT_FOUND , `Project ${ partialProject . id } not found.` ) ;
443443 }
444444
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+
445455 // Merge settings so that clients don't need to pass previous value all the time
446456 // (not update setting field if undefined)
447457 if ( partialProject . settings ) {
You can’t perform that action at this time.
0 commit comments