Update to new goprogram version
This commit is contained in:
parent
7bd9570bc0
commit
873fdcd5c2
106 changed files with 478 additions and 825 deletions
|
|
@ -27,7 +27,7 @@ func (policy *Policy) Set(ctx context.Context, grant models.Grant) error {
|
|||
|
||||
// check that the referenced user exists!
|
||||
{
|
||||
_, err := policy.Dependencies.Auth.User(ctx, grant.User)
|
||||
_, err := policy.dependencies.Auth.User(ctx, grant.User)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ import (
|
|||
type Policy struct {
|
||||
component.Base
|
||||
|
||||
Dependencies struct {
|
||||
dependencies struct {
|
||||
SQL *sql.SQL
|
||||
Auth *auth.Auth
|
||||
}
|
||||
|
|
@ -29,10 +29,10 @@ var (
|
|||
func (pol *Policy) TableInfo() component.TableInfo {
|
||||
return component.TableInfo{
|
||||
Name: models.GrantTable,
|
||||
Model: reflectx.MakeType[models.Grant](),
|
||||
Model: reflectx.TypeFor[models.Grant](),
|
||||
}
|
||||
}
|
||||
|
||||
func (pol *Policy) table(ctx context.Context) (*gorm.DB, error) {
|
||||
return pol.Dependencies.SQL.QueryTable(ctx, pol)
|
||||
return pol.dependencies.SQL.QueryTable(ctx, pol)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue