1
0
mirror of https://github.com/rancher/norman.git synced 2025-09-17 23:59:36 +00:00

Enable access control

This commit is contained in:
Darren Shepherd
2017-12-18 13:56:50 -07:00
parent 830a21b54d
commit bfcad0d1b1
6 changed files with 55 additions and 21 deletions

View File

@@ -158,7 +158,7 @@ func newCollection(apiContext *types.APIContext) *types.GenericCollection {
}
if apiContext.Method == http.MethodGet {
if apiContext.AccessControl.CanCreate(apiContext.Schema) {
if apiContext.AccessControl.CanCreate(apiContext, apiContext.Schema) {
result.CreateTypes[apiContext.Schema.ID] = apiContext.URLBuilder.Collection(apiContext.Schema, apiContext.Version)
}
}