Skip to content

Commit e8da644

Browse files
committed
fix: makeOwner endpoints notifications
1 parent 4d6221b commit e8da644

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

graph/user_op.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ func LeaveRole(uctx *model.UserCtx, tension *model.Tension, node *model.NodeFrag
9797
}
9898
// If owner is alone, prevent orphan organization
9999
if len(owners) < 2 {
100-
return false, LogErr("access denied", fmt.Errorf("An organization need at least one Owner. Please contact us if you need to transfer ownership."))
100+
return false, LogErr("access denied", fmt.Errorf("An organization needs at least one Owner. Please contact us if you need to transfer ownership."))
101101
}
102102

103103
// Downgrade Owner to Member

web/email/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ func SendOwnerGrantedEmail(username, nameid, orgName string) error {
225225
"to": ["%s"],
226226
"subject": "Ownership of %s was granted",
227227
"html_body": "%s"
228-
}`, email, tools.CleanString(content, true))
228+
}`, email, orgName, tools.CleanString(content, true))
229229

230230
req, err := http.NewRequest("POST", emailUrl, bytes.NewBuffer([]byte(body)))
231231
req.Header.Set("Content-Type", "application/json")

web/handlers/iam.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func MakeOwner(w http.ResponseWriter, r *http.Request) {
8383
} else {
8484
orgName = x.(string)
8585
}
86-
if x, err := db.GetDB().GetSubSubFieldByEq("Node.nameid", "f6", "Node.source", "Blob.tension", "uid"); err != nil {
86+
if x, err := db.GetDB().GetSubSubFieldByEq("Node.nameid", form.Nameid, "Node.source", "Blob.tension", "uid"); err != nil {
8787
http.Error(w, err.Error(), 500)
8888
return
8989
} else {

0 commit comments

Comments
 (0)