Don't send cred user with org

This commit is contained in:
Jake McDermott
2020-06-23 11:04:35 -04:00
parent a669db989c
commit 35e5c7f309
5 changed files with 25 additions and 18 deletions

View File

@@ -495,7 +495,10 @@ function AddEditCredentialsController (
}
function create (data) {
data.user = me.get('id');
// can send only one of org, user, team
if (!data.organization && !data.team) {
data.user = me.get('id');
}
if (_.get(data.inputs, gceFileInputSchema.id)) {
delete data.inputs[gceFileInputSchema.id];
@@ -524,7 +527,11 @@ function AddEditCredentialsController (
* Otherwise inputs are merged together making the request invalid.
*/
function update (data) {
data.user = me.get('id');
// can send only one of org, user, team
if (!data.organization && !data.team) {
data.user = me.get('id');
}
credential.unset('inputs');
if (_.get(data.inputs, gceFileInputSchema.id)) {