Backend\Modules\Authentication\Actions\Index::getAllowedAction PHP Method

getAllowedAction() private method

Run through the action of a certain module and find us an action(name) this user is allowed to access.
private getAllowedAction ( $module ) : boolean | string
$module
return boolean | string
    private function getAllowedAction($module)
    {
        if (BackendAuthentication::isAllowedAction('Index', $module)) {
            return 'Index';
        }
        $allowedAction = false;
        $groupsRightsActions = BackendUsersModel::getModuleGroupsRightsActions($module);
        foreach ($groupsRightsActions as $groupsRightsAction) {
            $isAllowedAction = BackendAuthentication::isAllowedAction($groupsRightsAction['action'], $module);
            if ($isAllowedAction) {
                $allowedAction = $groupsRightsAction['action'];
                break;
            }
        }
        return $allowedAction;
    }