@@ 409-424 (lines=16) @@ | ||
406 | * |
|
407 | * @return bool |
|
408 | */ |
|
409 | public function canCreateCategories($member = null) |
|
410 | { |
|
411 | $member = $this->getMember($member); |
|
412 | ||
413 | $parent = $this->Parent(); |
|
414 | ||
415 | if (!$parent || !$parent->exists() || !($parent instanceof Blog)) { |
|
416 | return false; |
|
417 | } |
|
418 | ||
419 | if ($parent->isEditor($member)) { |
|
420 | return true; |
|
421 | } |
|
422 | ||
423 | return Permission::checkMember($member, 'ADMIN'); |
|
424 | } |
|
425 | ||
426 | /** |
|
427 | * Determine whether user can create new tags. |
|
@@ 433-452 (lines=20) @@ | ||
430 | * |
|
431 | * @return bool |
|
432 | */ |
|
433 | public function canCreateTags($member = null) |
|
434 | { |
|
435 | $member = $this->getMember($member); |
|
436 | ||
437 | $parent = $this->Parent(); |
|
438 | ||
439 | if (!$parent || !$parent->exists() || !($parent instanceof Blog)) { |
|
440 | return false; |
|
441 | } |
|
442 | ||
443 | if ($parent->isEditor($member)) { |
|
444 | return true; |
|
445 | } |
|
446 | ||
447 | if ($parent->isWriter($member)) { |
|
448 | return true; |
|
449 | } |
|
450 | ||
451 | return Permission::checkMember($member, 'ADMIN'); |
|
452 | } |
|
453 | ||
454 | /** |
|
455 | * {@inheritdoc} |