Skip to content

Commit

Permalink
Remove default authentication_policy value FIX colymba#77
Browse files Browse the repository at this point in the history
Fixes type mismatch error when using arrays with default being boolean
  • Loading branch information
colymba committed Mar 14, 2017
1 parent 798d845 commit cff1ecf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions code/RESTfulAPI.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,14 @@ class RESTfulAPI extends Controller

/**
* Lets you select if the API requires authentication for access
* false = no authentication required
* null|false = no authentication required
* true = authentication required for all HTTP methods
* array = authentication required for selected HTTP methods e.g. array('POST', 'PUT', 'DELETE')
*
* @var boolean|array
* @config
*/
private static $authentication_policy = false;
private static $authentication_policy;


const ACL_CHECK_CONFIG_ONLY = 'config';
Expand Down
2 changes: 1 addition & 1 deletion doc/RESTfulAPI.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Director:
Config | Type | Info | Default
--- | :---: | --- | ---
`authentication_policy` | `boolean`/`array` | If true, the API will use authentication, if false no authentication required. Or an array of HTTP methods that require authentication | false
`authentication_policy` | `boolean`/`array` | If true, the API will use authentication, if false|null no authentication required. Or an array of HTTP methods that require authentication | false
`access_control_policy` | `boolean`/`string` | Lets you select which access control checks the API will perform or none at all. | 'ACL_CHECK_CONFIG_ONLY'
`dependencies` | `array` | key => value pairs sepcifying the components classes used for the `'authenticator'`, `'queryHandler'` and `'serializer'` | 'authenticator' => '%$RESTfulAPI_TokenAuthenticator', 'queryHandler' => '%$RESTfulAPI_DefaultQueryHandler', 'serializer' => '%$RESTfulAPI_BasicSerializer'
`embedded_records` | `array` | key => value pairs sepcifying which relation names to embed in the response and for which model this applies (i.e. 'RequestedClass' => array('RelationNameToEmbed')) | n/a
Expand Down

0 comments on commit cff1ecf

Please sign in to comment.