only allow big M to forge new content
Ted Unangst tedu@tedunangst.com
Sun, 28 Apr 2019 23:26:12 -0400
M
fun.go
→
fun.go
@@ -385,7 +385,7 @@ }
return false } -func keymatch(keyname string, actor string, userid int64) bool { +func keymatch(keyname string, actor string, what string, userid int64) bool { hash := strings.IndexByte(keyname, '#') if hash == -1 { hash = len(keyname)@@ -393,6 +393,9 @@ }
owner := keyname[0:hash] if owner == actor { return true + } + if what != "Create" { + return false } row := stmtHasHonker.QueryRow(owner, userid) var id int64