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
|
|
@ -35,8 +35,9 @@ func (li *ListInstances) Infos() []status.WissKI {
|
|||
|
||||
// ShouldShowList determines if a list should be shown for the given request
|
||||
func (li *ListInstances) ShouldShowList(r *http.Request) bool {
|
||||
allowPrivate := li.Config.Home.List.Private.Value
|
||||
allowPublic := li.Config.Home.List.Public.Value
|
||||
config := component.GetStill(li).Config.Home.List
|
||||
allowPrivate := config.Private.Value
|
||||
allowPublic := config.Public.Value
|
||||
|
||||
if allowPrivate == allowPublic {
|
||||
return allowPrivate
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue