Re: How to resolve this? One table per type of object, many users, user can access only his objects
Can you more explain your idea? thank you W dniu 2010-08-09 18:15, cricket pisze: On Sun, Aug 8, 2010 at 11:16 AM, Mariaczi.PL wrote: Hi! I have a problem. I need to create card indexes. Group has Files(e.g. Families), Group has many users, and users from one group have to have access only for records which have correct group_id. Families is one table, and family have memberships :) like parents, childrens. Security is very important. Users from other groups shouldnt can see or edit files which is property of another group. How to resolve this... ? It's difficult to say without a better idea of your models. Your explanation is a bit confusing. But something like: 'conditions' => array( 'Model.group_id' => $this->Auth->user('group_id') ) That'll work in the controller but, if your find() code is in the model, you'll need to pass the group_id to the model method: $data = "" function fetchStuff($group_id = null) { Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -- z poważaniem Marek Wojciech Urbanowicz Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
Re: How to resolve this? One table per type of object, many users, user can access only his objects
On Sun, Aug 8, 2010 at 11:16 AM, Mariaczi.PL wrote: > Hi! > > I have a problem. > > I need to create card indexes. > > Group has Files(e.g. Families), Group has many users, and users from > one group have to have access only for records which have correct > group_id. > Families is one table, and family have memberships :) like parents, > childrens. > Security is very important. Users from other groups shouldnt can see > or edit files which is property of another group. > > How to resolve this... ? It's difficult to say without a better idea of your models. Your explanation is a bit confusing. But something like: 'conditions' => array( 'Model.group_id' => $this->Auth->user('group_id') ) That'll work in the controller but, if your find() code is in the model, you'll need to pass the group_id to the model method: $data = $this->Model->fetchStuff($this->Auth->user('group_id')); function fetchStuff($group_id = null) { Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en
How to resolve this? One table per type of object, many users, user can access only his objects
Hi! I have a problem. I need to create card indexes. Group has Files(e.g. Families), Group has many users, and users from one group have to have access only for records which have correct group_id. Families is one table, and family have memberships :) like parents, childrens. Security is very important. Users from other groups shouldnt can see or edit files which is property of another group. How to resolve this... ? Check out the new CakePHP Questions site http://cakeqs.org and help others with their CakePHP related questions. You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en