only allow big M to forge new content
This commit is contained in:
parent
16d05c5eea
commit
bf505478ce
5
fun.go
5
fun.go
|
@ -385,7 +385,7 @@ func thoudostbitethythumb(userid int64, who []string, objid string) bool {
|
|||
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)
|
||||
|
@ -394,6 +394,9 @@ func keymatch(keyname string, actor string, userid int64) bool {
|
|||
if owner == actor {
|
||||
return true
|
||||
}
|
||||
if what != "Create" {
|
||||
return false
|
||||
}
|
||||
row := stmtHasHonker.QueryRow(owner, userid)
|
||||
var id int64
|
||||
err := row.Scan(&id)
|
||||
|
|
Loading…
Reference in New Issue