Skip to content

Commit

Permalink
AMP-3053:
Browse files Browse the repository at this point in the history
- fix AC for output links
- remove tmp logs
  • Loading branch information
yingfeng-iu committed Nov 8, 2023
1 parent c2c542c commit ed5849f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 41 deletions.
8 changes: 3 additions & 5 deletions src/components/entity/EntityList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -1360,7 +1360,6 @@ export default {
self.showEdit = false;
}
} else if (self.baseUrl === "file") {
console.log("start loading file: showLoader = " + self.showLoader);
self.showLoader = true;
self.entity = self.selectedFile;
if (self.accessControl._primaryfile_media._read) {
Expand All @@ -1375,9 +1374,8 @@ export default {
);
self.entity["mediaInfo"] = mediaSourceType.mediaInfo;
self.entity["mediaType"] = mediaSourceType.mimeType.substring(0, 5);
console.log("mediaType = " + self.entity.mediaType);
// console.log("mediaType = " + self.entity.mediaType);
self.showLoader = false;
console.log("end loading file: showLoader = " + self.showLoader);
}
},
async getUnitCollections() {
Expand Down Expand Up @@ -1516,8 +1514,8 @@ export default {
formHTML.style.width = "100%";
}
console.log("end of mounted: mediaSource = " + self.entity.mediaSource);
console.log("end of mounted: mediaType = " + self.entity.mediaType);
// console.log("end of mounted: mediaSource = " + self.entity.mediaSource);
// console.log("end of mounted: mediaType = " + self.entity.mediaType);
},
};
</script>
Expand Down
37 changes: 6 additions & 31 deletions src/components/entity/OutputFile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,53 +34,27 @@
<!-- -->
<tr v-for="output in listOfOutputList" :key="output.id">
<td>
<!-- <input type="text" :value="12/28/2021" class="form-control" disabled /> -->
<p>{{ new Date(output.dateCreated) | LOCAL_DATE_VALUE }}</p>
</td>
<td>
<!-- <input
type="text"
:value="output.submitter"
class="form-control"
disabled
/> -->
{{ output.submitter }}
</td>
<td>
<!-- <input
type="text"
:value="output.workflowName"
class="form-control"
disabled
/> -->
{{ output.workflowName }}
</td>

<td>
<!-- <input
type="text"
:value="output.workflowStep"
class="form-control"
disabled
/> -->
{{ output.workflowStep }}
</td>
<td>
<!-- <input
type="text"
:value="output.outputLink"
class="form-control"
disabled
/> -->
<a
v-if="
output.outputPath != null &&
output.status == 'COMPLETE' &&
accessControl._workflowresult_output._read
"
@click="workflowResultService.getSymlinkContent(output, true, null, $event)"
class="complete-output"
target="_blank"
v-if="
output.outputPath != null &&
output.status == 'COMPLETE' &&
accessControl._workflowresult._read
"
>
{{ output.outputName }}</a
>
Expand Down Expand Up @@ -189,6 +163,7 @@ export default {
},
mounted() {
this.getOutputFileList();
console.log("accessControl._workflowresult_output._read = " + this.accessControl._workflowresult_output._read);
},
};
</script>
Expand Down
3 changes: 1 addition & 2 deletions src/service/access-control-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,8 +185,7 @@ export default class AccessControlService extends BaseService {
break;
}
} else if (
action.targetType ===
env.getEnv("VUE_APP_AC_TARGETTYPE_PRIMARYFILE")
action.targetType === env.getEnv("VUE_APP_AC_TARGETTYPE_PRIMARYFILE")
) {
switch (action.actionType) {
case env.getEnv("VUE_APP_AC_ACTIONTYPE_CREATE"):
Expand Down
3 changes: 1 addition & 2 deletions src/service/account-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ function sendActivateUserRequest(userToken) {
}

function login(username, password) {
console.log("login");
return baseService.post(`/account/authenticate`, { username, password })
.then(response => {
const { token, user } = response.data;
Expand All @@ -93,7 +92,7 @@ async function validate() {
console.log("IN ERROR");
return false;
});
console.log("Success: " + success);
console.log("User authenticated: " + success);
return success;
}

Expand Down
4 changes: 3 additions & 1 deletion src/service/hmgm-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,10 @@ async function auth_token_required(auth_string, input_file){

async function auth_token_valid(auth_string, input_file, user_token){
if(env.getDisableAuth() == 'true'){
console.log("Authenticated disabled: " + success);
return true;
}

// TODO the following API call to check auth string might be unnecessary,
// because the backend validate auth string upon any HMGM API call;
// the purpose here might be to prevent the page from being shown beore any HMGM API call is made
Expand All @@ -43,8 +45,8 @@ async function auth_token_valid(auth_string, input_file, user_token){
console.log("Error: " + e);
return false;
});
console.log("Success: " + success);

console.log("User authenticated for HMGM editor: " + success);
return success;
}

Expand Down

0 comments on commit ed5849f

Please sign in to comment.