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