@@ 166-172 (lines=7) @@ | ||
163 | * |
|
164 | * @return bool|int |
|
165 | */ |
|
166 | public function canEdit($member = null) |
|
167 | { |
|
168 | $member = ($member === null) ? Member::currentUser() : $member; |
|
169 | ||
170 | return ((Permission::check('WishList_EDIT', 'any', |
|
171 | $member) && $member->ID == $this->MemberID) || Permission::check('ADMIN')); |
|
172 | } |
|
173 | ||
174 | /** |
|
175 | * @param Member|null $member |
|
@@ 179-185 (lines=7) @@ | ||
176 | * |
|
177 | * @return bool|int |
|
178 | */ |
|
179 | public function canDelete($member = null) |
|
180 | { |
|
181 | $member = ($member === null) ? Member::currentUser() : $member; |
|
182 | ||
183 | return ((Permission::check('WishList_DELETE', 'any', |
|
184 | $member) && $member->ID == $this->MemberID) || Permission::check('ADMIN')); |
|
185 | } |
|
186 | ||
187 | /** |
|
188 | * @param Member|null $member |
|
@@ 202-208 (lines=7) @@ | ||
199 | * |
|
200 | * @return bool |
|
201 | */ |
|
202 | public function canView($member = null) |
|
203 | { |
|
204 | $member = ($member === null) ? Member::currentUser() : $member; |
|
205 | ||
206 | return (!$this->Private) || ((Permission::check('WishList_VIEW', 'any', |
|
207 | $member) && $member->ID == $this->MemberID) || Permission::check('ADMIN')); |
|
208 | } |
|
209 | ||
210 | } |