21282 Posts in 5730 Topics by 2601 members
General Questions
SilverStripe Forums » General Questions » Permissions on DataObject for RESTful server $api_access
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 367 Views |
-
Permissions on DataObject for RESTful server $api_access

18 May 2012 at 3:06am
I have a DataObject "Enhancement"
Another server on our internal network needs to be able to pull data from Enhancement.
I've set $api_access with:
static $api_access = array(
'view' => array(
'Title',
'userid',
'Description',
'Ecallnumber',
'feedback'));If I'm logged in I can go to my URL http://servername/enhancement/api/V1/Enhancement and see the data.
If I log out of the site I only get <DataObjectSet totalSize="48">
</DataObjectSet>How can I allow users who aren't logged access to view the data?
Thanks,
Brian -
Re: Permissions on DataObject for RESTful server $api_access

18 May 2012 at 11:19am
Just needed to add
function canView(){
return true;
}
| 367 Views | ||
|
Page:
1
|
Go to Top |

