Jump to:

3460 Posts in 1064 Topics by 739 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: 307 Views
  • BenWu
    Community Member
    90 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

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.