xorm acl mysql example / doc
hello, i've tried many ways to add xorm_acl_entry in mysql but no luck, some of them:
yaml:
insert into xorm_acl_entry values ('match: {account: "test"}\nactions: ["push", "pull"]', 10);
insert into xorm_acl_entry values ('- match: {account: "test"}\n actions: ["push", "pull"]', 10);
yaml inline:
insert into xorm_acl_entry values ('{match: {account: test}, actions: [push, pull]}', 10);
insert into xorm_acl_entry values ('[{match: {account: test}, actions: [push, pull]}]', 10);
json:
insert into xorm_acl_entry values ('{"match": {"account": "test"}, "actions": ["push", "pull"]}', 10);
insert into xorm_acl_entry values ('[{"match": {"account": "test"}, "actions": ["push", "pull"]}]', 10);
log:
Config from /config/auth_config.yml (0 users, 0 ACL static entries)
Created ACL Authorizer with 0 entries
Got new ACL from XORM: []
Installed new ACL from XORM (0 entries)
Please show an example. Thanks!
Having the same problem with Postgres
I believe this is a bug. When I run the logic that reads ACL from database:
err = engine.OrderBy("seq").Find(&newACL)
I got the following error:
unsupported non or composited primary key cascade
My guess is you need some kind of logic to convert the text read from the database into a proper struct.
We have the same issue. None of the above entries are identified. I1021 14:44:16.078731 1 main.go:246] docker_auth build I1021 14:44:16.084082 1 main.go:61] Config from /config/auth_config.yml (2 users, 0 ACL static entries) I1021 14:44:16.097002 1 main.go:110] Cert file: /certs/token_public_certificate.pem I1021 14:44:16.097033 1 main.go:111] Key file : /certs/token_private.key I1021 14:44:16.099771 1 main.go:173] Serving on :5001
Did anyone figure this out?