Jump to:

23375 Posts in 18175 Topics by 2866 members

General Questions

SilverStripe Forums » General Questions » Permissions CanView() [Solved]

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 756 Views
  • cumquat
    Avatar
    Community Member
    191 Posts

    Permissions CanView() [Solved] Link to this post

    Hi there,

    Been a while since i have been on but have now started the road of learning the nuances of SS3 and i have come across my first lack of knowledge, im trying to give a use access to the dataobject 'Job' via Model Admin nothing major but when I try to use the good ole

    public function canView() {
    return true;
       }


    i get this error notice

    [Strict Notice] Declaration of Job::canView() should be compatible with that of DataObject::canView()

    I have no idea what this means and i cant find any information to tell me what im doing wrong.

    Any help or pointers please.

    Mick

  • cumquat
    Avatar
    Community Member
    191 Posts

    Re: Permissions CanView() [Solved] Link to this post

    Ok isn't that always the way, you spend hours looking for it, cant find it, post it, then just happen to open up someone else's code that has it....

    so what i needed was

    public function canView($member = null) {
    return true;
       }

    cheers

    Mick

    756 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.