Fixed execution debugging info

This commit is contained in:
frikky
2021-01-24 04:43:13 +01:00
parent 5dd78211d4
commit 46f640c0cc
3 changed files with 13 additions and 11 deletions
+2 -2
View File
@@ -2872,8 +2872,8 @@ func setUser(ctx context.Context, data *User) error {
// Used for testing only. Shouldn't impact production.
func handleCors(resp http.ResponseWriter, request *http.Request) bool {
//allowedOrigins := "*"
allowedOrigins := "http://localhost:3000"
//allowedOrigins := "http://localhost:3000"
allowedOrigins := "http://localhost:3002"
resp.Header().Set("Vary", "Origin")
resp.Header().Set("Access-Control-Allow-Headers", "Content-Type, Accept, X-Requested-With, remember-me")
+10 -8
View File
@@ -5211,7 +5211,8 @@ func getWorkflowApps(resp http.ResponseWriter, request *http.Request) {
return
}
// FIXME - set this to be per user IF logged in, as there might exist private and public
// FIXME - set this to be per user IF logged in,
// as there might exist private and public
//memcacheName := "all_apps"
ctx := context.Background()
@@ -5219,10 +5220,11 @@ func getWorkflowApps(resp http.ResponseWriter, request *http.Request) {
// FIXME - need to be logged in?
user, userErr := handleApiAuthentication(resp, request)
if userErr != nil {
log.Printf("Api authentication failed in get all apps: %s", userErr)
resp.WriteHeader(401)
resp.Write([]byte(`{"success": false}`))
return
log.Printf("Continuing with apps even without auth")
//log.Printf("Api authentication failed in get all apps: %s", userErr)
//resp.WriteHeader(401)
//resp.Write([]byte(`{"success": false}`))
//return
}
//if item, err := memcache.Get(ctx, memcacheName); err == memcache.ErrCacheMiss {
@@ -5268,9 +5270,9 @@ func getWorkflowApps(resp http.ResponseWriter, request *http.Request) {
newapps := []WorkflowApp{}
baseApps := []WorkflowApp{}
for _, workflowapp := range workflowapps {
if !workflowapp.Activated && workflowapp.Generated {
continue
}
//if !workflowapp.Activated && workflowapp.Generated {
// continue
//}
if workflowapp.Owner != user.Id && user.Role != "admin" && !workflowapp.Sharing {
continue
+1 -1
View File
@@ -1496,7 +1496,7 @@ const Admin = (props) => {
})}
</Grid>
<Divider style={{ marginTop: 20, marginBottom: 20, backgroundColor: theme.palette.inputColor }} />
{isCloud && selectedOrganization.subscriptions !== null && selectedOrganization.subscriptions.length > 0 ?
{isCloud && selectedOrganization.subscriptions !== undefined && selectedOrganization.subscriptions !== null && selectedOrganization.subscriptions.length > 0 ?
<div style={{marginTop: 30, marginBottom: 20}}>
<Typography style={{marginTop: 40, marginLeft: 10, marginBottom: 5,}}>
Your subscription{selectedOrganization.subscriptions.length > 1 ? "s" : ""}