mirror of
https://github.com/datarhei/core.git
synced 2025-10-23 16:03:14 +08:00
Change names of struct fields in adaptor
This commit is contained in:
@@ -478,7 +478,7 @@ func (a *adapter) GetAllGroupNames() []string {
|
|||||||
type Group struct {
|
type Group struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Roles map[string][]Role `json:"roles"`
|
Roles map[string][]Role `json:"roles"`
|
||||||
UserRoles []MapUserRole `json:"users"`
|
UserRoles []MapUserRole `json:"userroles"`
|
||||||
Policies []Policy `json:"policies"`
|
Policies []Policy `json:"policies"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Binary file not shown.
@@ -73,7 +73,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"users": [
|
"userroles": [
|
||||||
{
|
{
|
||||||
"username": "alice",
|
"username": "alice",
|
||||||
"role": "admin"
|
"role": "admin"
|
||||||
@@ -105,7 +105,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"users": [
|
"userroles": [
|
||||||
{
|
{
|
||||||
"username": "$anon",
|
"username": "$anon",
|
||||||
"role": "anonymous"
|
"role": "anonymous"
|
||||||
@@ -191,7 +191,7 @@
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"users": [
|
"userroles": [
|
||||||
{
|
{
|
||||||
"username": "franz",
|
"username": "franz",
|
||||||
"role": "admin"
|
"role": "admin"
|
||||||
|
93
app/casbin/users.json
Normal file
93
app/casbin/users.json
Normal file
@@ -0,0 +1,93 @@
|
|||||||
|
[
|
||||||
|
{
|
||||||
|
"name": "alice",
|
||||||
|
"superuser": false,
|
||||||
|
"auth": {
|
||||||
|
"api": {
|
||||||
|
"userpass": {
|
||||||
|
"enable": true,
|
||||||
|
"username": "foo",
|
||||||
|
"password": "bar"
|
||||||
|
},
|
||||||
|
"auth0": {
|
||||||
|
"enable": true,
|
||||||
|
"user": "google|42",
|
||||||
|
"tenant": "tenant1"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"http": {
|
||||||
|
"basic": {
|
||||||
|
"enable": true,
|
||||||
|
"username": "bar",
|
||||||
|
"password": "baz"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rtmp": {
|
||||||
|
"enable": true,
|
||||||
|
"token": "abc123"
|
||||||
|
},
|
||||||
|
"srt": {
|
||||||
|
"enable": true,
|
||||||
|
"token": "xyz987"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "bob",
|
||||||
|
"superuser": true,
|
||||||
|
"auth": {
|
||||||
|
"api": {
|
||||||
|
"userpass": {
|
||||||
|
"enable": true,
|
||||||
|
"username": "foo",
|
||||||
|
"password": "baz"
|
||||||
|
},
|
||||||
|
"auth0": {
|
||||||
|
"enable": true,
|
||||||
|
"user": "github|88",
|
||||||
|
"tenant": "tenant2"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"http": {
|
||||||
|
"basic": {
|
||||||
|
"enable": true,
|
||||||
|
"username": "boz",
|
||||||
|
"password": "bok"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rtmp": {
|
||||||
|
"enable": true,
|
||||||
|
"token": "abc456"
|
||||||
|
},
|
||||||
|
"srt": {
|
||||||
|
"enable": true,
|
||||||
|
"token": "xyz654"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "$anon",
|
||||||
|
"superuser": false,
|
||||||
|
"auth": {
|
||||||
|
"api": {
|
||||||
|
"userpass": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"auth0": {
|
||||||
|
"enable": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"http": {
|
||||||
|
"basic": {
|
||||||
|
"enable": false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"rtmp": {
|
||||||
|
"enable": false
|
||||||
|
},
|
||||||
|
"srt": {
|
||||||
|
"enable": false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
Reference in New Issue
Block a user