Added character service and such.
the build was successful

This commit is contained in:
2019-06-10 17:03:52 +02:00
parent 7b253748fe
commit 2a1423d28f
32 changed files with 1551 additions and 277 deletions
+3
View File
@@ -2,6 +2,7 @@ package auth
import (
"context"
"log"
"reflect"
"git.aiterp.net/rpdata/api/models"
@@ -43,6 +44,8 @@ func CheckPermission(ctx context.Context, op string, obj interface{}) error {
authorized = token.PermittedUser(v.Author, "member", "story."+op)
case *models.User:
authorized = token.Permitted("user." + op)
default:
log.Panicf("Invalid model %T: %#+v", v, v)
}
if !authorized {