Generate a secure admin-action link authorised for the specified member

@param string $action An action on CommentingController to link to
@param Member $member The member authorised to invoke this action

@return string
514296
protected function actionLink($action, $member = null)
    {
        if (!$member) {
            $member = Member::currentUser();
        }
        if (!$member) {
            return false;
        }

        /**
         * @todo: How do we handle "DataObject" instances that don't have a Link to reject/spam/delete?? This may
         * we have to make CMS a hard dependency instead.
         */
        // if (!$this->Parent()->hasMethod('Link')) {
        //     return false;
        // }

        $url = Controller::join_links(
            Director::baseURL(),
            'comments',
            $action,
            $this->ID
        );

        // Limit access for this user
        $token = $this->getSecurityToken();
        return $token->addToUrl($url, $member);
    }
522509
public function canEditPages($member = null)
    {
        if (!$member) {
            $member = Security::getCurrentUser();
        }

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

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

        // check for any logged-in users with CMS access
        if ($this->CanEditType === 'LoggedInUsers'
            && Permission::checkMember($member, $this->config()->get('required_permission'))
        ) {
            return true;
        }

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

        return false;
    }
246694
protected function CanEdit(Member $member)
    {
        return self::Guard()->Allow(BackendAction::Edit(), $member) && 
                self::Guard()->Allow(BackendAction::UseIt(), new MemberForm());
    }
87165
public function Link($action = null)
    {
        $curr = Controller::curr();
        if ($this->parentDashboardPage) {
            return Controller::join_links($this->parentDashboardPage->Link(), 'widget', ($this->widget ? $this->widget->ID : null), $action);
        }
        if ($curr != $this) {
            $pageLink = Controller::curr()->Link();
            return Controller::join_links($pageLink, 'widget', ($this->widget ? $this->widget->ID : null), $action);
        }
        
        return Controller::join_links('widget', ($this->widget ? $this->widget->ID : null), $action);
    }
839206
public function canEdit($member = null)
    {
        $parent = $this->Parent();
        if ($parent && $parent->exists()) {
            return $parent->canEdit($member) && !$this->isReadonly();
        } elseif (!$this->exists() && Controller::has_curr()) {
            // This is for GridFieldOrderableRows support as it checks edit permissions on
            // singleton of the class. Allows editing of User Defined Form pages by
            // 'Content Authors' and those with permission to edit the UDF page. (ie. CanEditType/EditorGroups)
            // This is to restore User Forms 2.x backwards compatibility.
            $controller = Controller::curr();
            if ($controller && $controller instanceof CMSPageEditController) {
                $parent = $controller->getRecord($controller->currentPageID());
                // Only allow this behaviour on pages using UserFormFieldEditorExtension, such
                // as UserDefinedForm page type.
                if ($parent && $parent->hasExtension(UserFormFieldEditorExtension::class)) {
                    return $parent->canEdit($member);
                }
            }
        }

        // Fallback to secure admin permissions
        return parent::canEdit($member);
    }
1297290
private static function CalcKey(Member $member)
    {
        return sha1($member->GetPasswordSalt() . $member->GetConfirmed() . $member->GetName());
    }
965521
public function Link($action = null)
    {
        $link = Controller::join_links(
            AdminRootController::admin_url(),
            $this->config()->get('url_segment'), // in case we want to change the segment
            '/', // trailing slash needed if $action is null!
            "$action"
        );
        $this->extend('updateLink', $link);
        return $link;
    }
1238192
public function onSkipRegistration(Member $member)
    {
        $this->getAuditLogger()->info(sprintf(
            '"%s" (ID: %s) skipped MFA registration',
            $member->Email ?: $member->Title,
            $member->ID
        ));
    }
1128794
public function getDataGridConfigCode(Action $action): string
    {
        // Check if datagrid code is set in options
        return $action->getOption(
            'datagrid',
            $action->getAdmin()->getOption(
                'datagrid',
                $action->getAdmin()->getCode() // Fallback to admin code
            )
        );
    }
919165
public function onMethodVerificationSuccess(Member $member, $method)
    {
        $this->getAuditLogger()->info(
            sprintf(
                '"%s" (ID: %s) successfully verified using MFA method',
                $member->Email ?: $member->Title,
                $member->ID
            ),
            ['method' => get_class($method)]
        );
    }
377396
protected function post_data($action)
  {
      $this->post['METHOD'] = $action;
      $this->post['VERSION'] = $this->version;
      $this->post['PWD'] = $this->options['password'];
      $this->post['USER'] = $this->options['login'];
      $this->post['SIGNATURE'] = $this->options['signature'];

      return $this->urlize($this->post);
  }
575071
public function Link($action = null)
    {
        // Forms without parent controller have no link;
        // E.g. Submission handled via graphql
        $controller = $this->form->getController();
        if (empty($controller)) {
            return null;
        }

        // Respect FormObjectLink() method
        if ($controller->hasMethod("FormObjectLink")) {
            $base = $controller->FormObjectLink($this->form->getName());
        } else {
            $base = Controller::join_links($controller->Link(), $this->form->getName());
        }

        // Join with action and decorate
        $link = Controller::join_links($base, $action, '/');
        $this->extend('updateLink', $link, $action);
        return $link;
    }
378606
def _assert_link_secret(self, action: str):
        

        if self._link_secret is None:
            LOGGER.debug('HolderProver._assert_link_secret: action %s requires link secret but it is not set', action)
            raise AbsentLinkSecret('Action {} requires link secret but it is not set'.format(action))
1202662
public function Link($action = '')
    {
        $link = Controller::join_links(
            Director::baseURL(),
            Config::inst()->get('DocumentationViewer', 'link_base'),
            $this->getLanguage(),
            $action,
            '/'
        );

        return $link;
    }
828125
public function Link($action = null)
    {
        if ($this->hasParentPage()) {
            return Controller::join_links(
                $this->hasParentPage()->Link(),
                $this->hasViewAction(),
                $this->owner->RelativeLink($action)
            );
        }

        return false;
    }
1027697
public function generateLink(ComponentInterface $component, ActionInterface $action = null)
    {
        try {
            return parent::generateLink($component, $action);
        } catch (\Exception $e) {
            return '';
        }
    }
838829
public function canExecute($action)
    {
        if (
            $this->isOwnable() &&
            $this->actor &&
            $this->actor->authorize('access') === false
            ) {
            return false;
        }

        return parent::canExecute($action);
    }