Return whether a user can create an object of this type

@param Member $member
@param array $context Virtual parameter to allow context to be passed in to check
@return bool
480594
public function canCreate($member = null, $context = [])
    {
        // Check parent object
        $parent = $this->Parent();
        if ($parent) {
            return $parent->canCreate($member);
        }

        // Fall back to secure admin permissions
        return parent::canCreate($member);
    }
1185447
public function canEdit($member)
    {
        // Override any default behaviour, to allow queuedjobs to complete
        if ($this->isPublishJobRunning()) {
            return true;
        }

        if ($active = $this->getWorkflowInstance()) {
            return $active->canEditTarget();
        }
    }
525818
public function contains($member): bool
    {
        return $member instanceof Resource && $member->uri &&
            $this->findURI($member->uri) >= 0;
    }
793403
public function canView($member = null)
    {
        //get member
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        //check for extensions, we do this first as they can overrule everything
        $extended = $this->extendedCan(__FUNCTION__, $member);
        if ($extended !== null) {
            return $extended;
        }

        //need to be logged in and/or most checks below rely on $member being a Member
        if (!$member) {
            return false;
        }
        // members can usually view their own record
        if ($this->ID == $member->ID) {
            return true;
        }

        //standard check
        return Permission::checkMember($member, 'CMS_ACCESS_SecurityAdmin');
    }
112303
function isUsable(?\CharlotteDunois\Livia\Commands\Context $context = null) {
        if($context === null) {
            return $this->globalEnabled;
        }
        
        if($this->guildOnly && $context->message->guild === null) {
            return false;
        }
        
        return ($this->isEnabledIn($context->message->guild) && $this->hasPermission($context) === true);
    }
1004685
public function canPublish($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }
        // Check all explicitly added items
        foreach ($this->Changes()->filter(['Added' => ChangeSetItem::EXPLICITLY]) as $change) {
            /** @var ChangeSetItem $change */
            if (!$change->canPublish($member)) {
                return false;
            }
        }

        return true;
    }
84218
public function canDelete($member=null) {
        $parentResult=parent::canDelete($member);
        
        if($parentResult==false || $this->UserLanguage==false) {
            return false;
        }
        
        if($this->Folders()->count()>0 || $this->Snippets()->count()>0) {
            return false;
        }
        
        return true;
    }
358805
public function canEdit($member = null)
    {
        $member = $this->getMember($member);

        if (!$member) {
            return false;
        }

        $extended = $this->extendedCan('canEdit', $member);
        if ($extended !== null) {
            return $extended;
        }

        if (Permission::checkMember($member, 'CMS_ACCESS_CommentAdmin')) {
            return true;
        }

        if ($parent = $this->Parent()) {
            return $parent->canEdit($member);
        }

        return false;
    }
392846
protected boolean generateJvmMembers(List<? extends JvmMember> members, ExtraLanguageAppendable it,
			IExtraLanguageGeneratorContext context) {
		for (final JvmMember member : members) {
			if (!(member instanceof JvmConstructor)) {
				if (context.getCancelIndicator().isCanceled()) {
					return false;
				}
				generate(member, it, context);
			}
		}
		return true;
	}
115241
protected function userHasAccess($member)
    {
        if (!$member) {
            if (!Security::getCurrentUser()) {
                return false;
            }
            $member = Security::getCurrentUser();
        }

        if (Permission::checkMember($member, "VIEW_ACTIVE_WORKFLOWS")) {
            return true;
        }
    }
20704
public function canEdit($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }

        $result = $this->extendedCan('canEdit', $member);
        if ($result !== null) {
            return $result;
        }

        if (Permission::checkMember($member, self::EDIT_ALL)) {
            return true;
        }

        // Check inherited permissions
        return static::getPermissionChecker()
            ->canEdit($this->ID, $member);
    }
871036
public function canViewPages($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }

        if ($member && Permission::checkMember($member, "ADMIN")) {
            return true;
        }

        $extended = $this->extendedCan('canViewPages', $member);
        if ($extended !== null) {
            return $extended;
        }

        if (!$this->CanViewType || $this->CanViewType == 'Anyone') {
            return true;
        }

        // check for any logged-in users
        if ($this->CanViewType === 'LoggedInUsers' && $member) {
            return true;
        }

        // check for specific groups
        if ($this->CanViewType === 'OnlyTheseUsers' && $member && $member->inGroups($this->ViewerGroups())) {
            return true;
        }

        return false;
    }
261393
public function canView($member = null)
    {
        $parent = $this->Parent();
        if ($parent && $parent->exists()) {
            return $parent->canView($member);
        }

        return true;
    }
823609
public function canArchive($member = null)
    {
        // Skip if invoked by extendedCan()
        if (func_num_args() > 4) {
            return null;
        }

        if (!$member) {
            $member = Security::getCurrentUser();
        }

        // Standard mechanism for accepting permission changes from extensions
        $owner = $this->owner;
        $extended = $owner->extendedCan('canArchive', $member);
        if ($extended !== null) {
            return $extended;
        }

        // Admin permissions allow
        if (Permission::checkMember($member, "ADMIN")) {
            return true;
        }

        // Check if this record can be deleted from stage
        if (!$owner->canDelete($member)) {
            return false;
        }

        // Check if we can delete from live
        if (!$owner->canUnpublish($member)) {
            return false;
        }

        return true;
    }
1210447
public function canView($member = null)
    {
        if (parent::canView($member)) {
            return true;
        }

        if (Subsite::all_accessible_sites()->count() > 0) {
            return true;
        }

        return false;
    }
271440
public function canPublish($member = null)
    {
        // No action for unversiond objects so no action to deny
        // Implicitly added items allow publish
        if (!$this->isVersioned() || $this->Added === self::IMPLICITLY) {
            return true;
        }

        // Check canMethod to invoke on object
        switch ($this->getChangeType()) {
            case static::CHANGE_DELETED: {
                /** @var Versioned|DataObject $object */
                $object = Versioned::get_by_stage($this->ObjectClass, Versioned::LIVE)->byID($this->ObjectID);
                if ($object) {
                    return $object->canUnpublish($member);
                }
                break;
            }
            default: {
                /** @var Versioned|DataObject $object */
                $object = Versioned::get_by_stage($this->ObjectClass, Versioned::DRAFT)->byID($this->ObjectID);
                if ($object) {
                    return $object->canPublish($member);
                }
                break;
            }
        }

        return true;
    }
591977
public function canVoid($member = null)
    {
        if (!($this->Status == 'Authorized' && GatewayInfo::allowVoid($this->Gateway))) {
            return false;
        }

        $extended = $this->extendedCan('canVoid', $member);
        if ($extended !== null) {
            return $extended;
        }

        return Permission::check('VOID_PAYMENTS', 'any', $member);
    }