Fixed so org editor has more control of org workflows

This commit is contained in:
Frikky
2025-01-27 12:55:30 +01:00
parent 89fcd6202e
commit 14d08b24c3
4 changed files with 8 additions and 21 deletions
+1 -1
View File
@@ -4842,7 +4842,7 @@ func makeWorkflowPublic(resp http.ResponseWriter, request *http.Request) {
// FIXME - add org check too, and not just owner
// Check workflow.Sharing == private / public / org too
if user.Id != workflow.Owner || len(user.Id) == 0 {
if workflow.OrgId == user.ActiveOrg.Id && user.Role == "admin" {
if workflow.OrgId == user.ActiveOrg.Id {
log.Printf("[AUDIT] User %s is accessing workflow %s as admin (public)", user.Username, workflow.ID)
} else {
log.Printf("[AUDIT] Wrong user (%s) for workflow %s (public)", user.Username, workflow.ID)