Jump to:

3373 Posts in 998 Topics by 712 members

Data Model Questions

SilverStripe Forums » Data Model Questions » DataExtension and canView

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

Page: 1
Go to End
Author Topic: 241 Views
  • BenWu
    Avatar
    Community Member
    87 Posts

    DataExtension and canView Link to this post

    Hello All,

    There is a method in the DataExtension.php in the framework. I am not sure what it does.

    I got a list of models ( Lead, Task, Note), I want to apply the same canView permission to them. Rather than writing canView/canEdit/canCreate for each of them, I create a PermissionExt class which has only 3 methods (canView, canEdit, canCreate), and then add this extension to the models (Lead,Task,Note) on _config.php

    but it doesn't work at all.

    One way to get around it is to define PermissionExt as another dataobject, and Lead,Task,Note will be a subclass of it. But I would like to understand how the dataextension works, and it sounds like more flexible way to do it

    241 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.