protected function userHasAccess($member)
    {
        if (!$member) {
            if (!Security::getCurrentUser()) {
                return false;
            }
            $member = Security::getCurrentUser();
        }

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

        // This method primarily "protects" access to a WorkflowInstance, but assumes access only to be granted to
        // users assigned-to that WorkflowInstance. However; lowly authors (users entering items into a workflow) are
        // not assigned - but we still wish them to see their submitted content.
        $inWorkflowGroupOrUserTables = ($member->inGroups($this->Groups()) || $this->Users()->find('ID', $member->ID));
        // This method is used in more than just the ModelAdmin. Check for the current controller to determine where
        // canView() expectations differ
        if ($this->getTarget() && Controller::curr()->getAction() == 'index' && !$inWorkflowGroupOrUserTables) {
            if ($this->getVersionedConnection($this->getTarget()->ID, $member->ID)) {
                return true;
            }
            return false;
        }
        return $inWorkflowGroupOrUserTables;
    }
protected function userHasAccess($member)
    {
        if (!$member) {
            if (!Security::getCurrentUser()) {
                return false;
            }
            $member = Security::getCurrentUser();
        }

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

        // This method primarily "protects" access to a WorkflowInstance, but assumes access only to be granted to
        // users assigned-to that WorkflowInstance. However; lowly authors (users entering items into a workflow) are
        // not assigned - but we still wish them to see their submitted content.
        $inWorkflowGroupOrUserTables = ($member->inGroups($this->Groups()) || $this->Users()->find('ID', $member->ID));
        // This method is used in more than just the ModelAdmin. Check for the current controller to determine where
        // canView() expectations differ
        if ($this->getTarget() && Controller::curr()->getAction() == 'index' && !$inWorkflowGroupOrUserTables) {
            if ($this->getVersionedConnection($this->getTarget()->ID, $member->ID)) {
                return true;
            }
            return false;
        }
        return $inWorkflowGroupOrUserTables;
    }
protected function userHasAccess ( $ member ) { if ( ! $ member ) { if ( ! Security :: getCurrentUser ( ) ) { return false ; } $ member = Security :: getCurrentUser ( ) ; } if ( Permission :: checkMember ( $ member , "ADMIN" ) ) { return true ; } // This method primarily "protects" access to a WorkflowInstance, but assumes access only to be granted to // users assigned-to that WorkflowInstance. However; lowly authors (users entering items into a workflow) are // not assigned - but we still wish them to see their submitted content. $ inWorkflowGroupOrUserTables = ( $ member -> inGroups ( $ this -> Groups ( ) ) || $ this -> Users ( ) -> find ( 'ID' , $ member -> ID ) ) ; // This method is used in more than just the ModelAdmin. Check for the current controller to determine where // canView() expectations differ if ( $ this -> getTarget ( ) && Controller :: curr ( ) -> getAction ( ) == 'index' && ! $ inWorkflowGroupOrUserTables ) { if ( $ this -> getVersionedConnection ( $ this -> getTarget ( ) -> ID , $ member -> ID ) ) { return true ; } return false ; } return $ inWorkflowGroupOrUserTables ; }
Checks whether the given user is in the list of users assigned to this
workflow

@param Member $member
Checks whether the given user is in the list of users assigned to this workflow