Require access to Still via method
This commit adds a safeguard to accessing the still from a specific component by requiring access via the component.GetStill method.
This commit is contained in:
parent
81fa84c244
commit
8235ea9105
63 changed files with 288 additions and 197 deletions
|
|
@ -19,6 +19,7 @@ func (up *UserPolicy) Fetch(flags ingredient.FetcherFlags, target *status.WissKI
|
|||
}
|
||||
|
||||
// read the grants into the info struct
|
||||
target.Grants, err = up.Malt.Policy.Instance(flags.Context, up.Slug)
|
||||
liquid := ingredient.GetLiquid(up)
|
||||
target.Grants, err = liquid.Policy.Instance(flags.Context, liquid.Slug)
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ func (u *Users) LoginWithOpt(ctx context.Context, server *phpx.Server, username
|
|||
}
|
||||
|
||||
// and resolve the (possibly relative) reference
|
||||
dest = u.URL().ResolveReference(dest)
|
||||
dest = ingredient.GetLiquid(u).URL().ResolveReference(dest)
|
||||
return
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue