Skip to content

Commit

Permalink
add get to schemas that CanGet
Browse files Browse the repository at this point in the history
  • Loading branch information
ibuildthecloud committed Feb 14, 2018
1 parent 69f36e0 commit 94b274a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions store/schema/schema_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ func (s *Store) modifyForAccessControl(context *types.APIContext, schema types.S
if slice.ContainsString(schema.ResourceMethods, http.MethodDelete) && schema.CanDelete(context) {
resourceMethods = append(resourceMethods, http.MethodDelete)
}
if slice.ContainsString(schema.ResourceMethods, http.MethodGet) && schema.CanGet(context) {
resourceMethods = append(resourceMethods, http.MethodGet)
}

var collectionMethods []string
if slice.ContainsString(schema.CollectionMethods, http.MethodPost) && schema.CanCreate(context) {
Expand Down

0 comments on commit 94b274a

Please sign in to comment.