mirror of
https://github.com/niusmallnan/steve.git
synced 2025-08-30 20:05:20 +00:00
Don't drop schemas that have existing authorization
This commit is contained in:
parent
c84c1b52af
commit
12b7626eda
@ -96,8 +96,6 @@ func (c *Collection) schemasForSubject(access *accesscontrol.AccessSet) (*types.
|
|||||||
// always allow list
|
// always allow list
|
||||||
s.CollectionMethods = append(s.CollectionMethods, http.MethodGet)
|
s.CollectionMethods = append(s.CollectionMethods, http.MethodGet)
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
continue
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -118,6 +116,10 @@ func (c *Collection) schemasForSubject(access *accesscontrol.AccessSet) (*types.
|
|||||||
s.CollectionMethods = append(s.CollectionMethods, http.MethodPost)
|
s.CollectionMethods = append(s.CollectionMethods, http.MethodPost)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if len(s.CollectionMethods) == 0 && len(s.ResourceMethods) == 0 {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
if err := result.AddSchema(*s); err != nil {
|
if err := result.AddSchema(*s); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user