TYPO3 v15 dev-main snapshot ()
This commit is contained in:
@@ -0,0 +1 @@
|
||||
/vendor/
|
||||
@@ -0,0 +1,771 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Controller;
|
||||
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use TYPO3\CMS\Backend\Authentication\PasswordReset;
|
||||
use TYPO3\CMS\Backend\Module\ModuleData;
|
||||
use TYPO3\CMS\Backend\Routing\UriBuilder as BackendUriBuilder;
|
||||
use TYPO3\CMS\Backend\Template\Components\ButtonBar;
|
||||
use TYPO3\CMS\Backend\Template\Components\ComponentFactory;
|
||||
use TYPO3\CMS\Backend\Template\Enum\ModuleLayout;
|
||||
use TYPO3\CMS\Backend\Template\ModuleTemplate;
|
||||
use TYPO3\CMS\Backend\Template\ModuleTemplateFactory;
|
||||
use TYPO3\CMS\Beuser\Domain\Dto\BackendUserGroup;
|
||||
use TYPO3\CMS\Beuser\Domain\Model\BackendUser;
|
||||
use TYPO3\CMS\Beuser\Domain\Model\Demand;
|
||||
use TYPO3\CMS\Beuser\Domain\Repository\BackendUserGroupRepository;
|
||||
use TYPO3\CMS\Beuser\Domain\Repository\BackendUserRepository;
|
||||
use TYPO3\CMS\Beuser\Domain\Repository\BackendUserSessionRepository;
|
||||
use TYPO3\CMS\Beuser\Domain\Repository\FileMountRepository;
|
||||
use TYPO3\CMS\Beuser\Event\AfterBackendGroupFilterListIsAssembledEvent;
|
||||
use TYPO3\CMS\Beuser\Event\AfterFilemountsListIsAssembledEvent;
|
||||
use TYPO3\CMS\Beuser\Service\UserInformationService;
|
||||
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
|
||||
use TYPO3\CMS\Core\Context\Context;
|
||||
use TYPO3\CMS\Core\Http\AllowedMethodsTrait;
|
||||
use TYPO3\CMS\Core\Imaging\IconFactory;
|
||||
use TYPO3\CMS\Core\Imaging\IconSize;
|
||||
use TYPO3\CMS\Core\Page\PageRenderer;
|
||||
use TYPO3\CMS\Core\Pagination\ArrayPaginator;
|
||||
use TYPO3\CMS\Core\Pagination\SimplePagination;
|
||||
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Http\ForwardResponse;
|
||||
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
|
||||
use TYPO3\CMS\Extbase\Mvc\Request;
|
||||
use TYPO3\CMS\Extbase\Mvc\RequestInterface;
|
||||
use TYPO3\CMS\Extbase\Pagination\QueryResultPaginator;
|
||||
use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
|
||||
|
||||
/**
|
||||
* Backend module user and user group administration controller.
|
||||
*
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
*/
|
||||
class BackendUserController extends ActionController
|
||||
{
|
||||
use AllowedMethodsTrait;
|
||||
|
||||
protected ?ModuleData $moduleData = null;
|
||||
protected ModuleTemplate $moduleTemplate;
|
||||
|
||||
public function __construct(
|
||||
protected readonly ComponentFactory $componentFactory,
|
||||
protected readonly BackendUserRepository $backendUserRepository,
|
||||
protected readonly BackendUserGroupRepository $backendUserGroupRepository,
|
||||
protected readonly BackendUserSessionRepository $backendUserSessionRepository,
|
||||
protected readonly UserInformationService $userInformationService,
|
||||
protected readonly ModuleTemplateFactory $moduleTemplateFactory,
|
||||
protected readonly BackendUriBuilder $backendUriBuilder,
|
||||
protected readonly IconFactory $iconFactory,
|
||||
protected readonly PageRenderer $pageRenderer,
|
||||
protected readonly FileMountRepository $fileMountRepository
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Store a valid selected action as defaultAction
|
||||
*/
|
||||
public function processRequest(RequestInterface $request): ResponseInterface
|
||||
{
|
||||
/** @var Request $request */
|
||||
$arguments = $request->getArguments();
|
||||
$moduleData = $request->getAttribute('moduleData');
|
||||
|
||||
if (in_array((string)($arguments['action'] ?? ''), ['list', 'groups', 'online', 'filemounts'], true)
|
||||
&& (string)$moduleData->get('defaultAction') !== (string)$arguments['action']
|
||||
) {
|
||||
$moduleData->set('defaultAction', (string)$arguments['action']);
|
||||
$this->getBackendUser()->pushModuleData($moduleData->getModuleIdentifier(), $moduleData->toArray());
|
||||
}
|
||||
|
||||
return parent::processRequest($request);
|
||||
}
|
||||
|
||||
/**
|
||||
* Init module state.
|
||||
* This isn't done within __construct() since the controller
|
||||
* object is only created once in extbase when multiple actions are called in
|
||||
* one call. When those change module state, the second action would see old state.
|
||||
*/
|
||||
public function initializeAction(): void
|
||||
{
|
||||
$this->moduleData = $this->request->getAttribute('moduleData');
|
||||
$this->moduleTemplate = $this->moduleTemplateFactory->create($this->request);
|
||||
$this->moduleTemplate->setTitle(LocalizationUtility::translate('beuser.modules.user_management:title'));
|
||||
$this->moduleTemplate->setLayout(ModuleLayout::NORMAL);
|
||||
$this->moduleTemplate->setFlashMessageQueue($this->getFlashMessageQueue());
|
||||
}
|
||||
|
||||
/**
|
||||
* Assign default variables to ModuleTemplate view
|
||||
*/
|
||||
protected function initializeView(): void
|
||||
{
|
||||
$this->moduleTemplate->assignMultiple([
|
||||
'dateFormat' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'],
|
||||
'timeFormat' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'],
|
||||
]);
|
||||
// Load JavaScript modules
|
||||
$this->pageRenderer->loadJavaScriptModule('@typo3/backend/context-menu.js');
|
||||
$this->pageRenderer->loadJavaScriptModule('@typo3/backend/modal.js');
|
||||
$this->pageRenderer->loadJavaScriptModule('@typo3/backend/element/status-indicator-element.js');
|
||||
$this->pageRenderer->loadJavaScriptModule('@typo3/beuser/backend-user-listing.js');
|
||||
}
|
||||
|
||||
/**
|
||||
* Default action, forwarding the request to either a defined default action or the default entry point "list"
|
||||
*/
|
||||
public function indexAction(): ResponseInterface
|
||||
{
|
||||
$moduleData = $this->request->getAttribute('moduleData');
|
||||
|
||||
if ($moduleData->has('defaultAction')
|
||||
&& in_array((string)$moduleData->get('defaultAction'), ['list', 'groups', 'online', 'filemounts'], true)
|
||||
) {
|
||||
return new ForwardResponse((string)$moduleData->get('defaultAction'));
|
||||
}
|
||||
|
||||
return new ForwardResponse('list');
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays all BackendUsers
|
||||
*/
|
||||
public function listAction(?Demand $demand = null, int $currentPage = 1, string $operation = ''): ResponseInterface
|
||||
{
|
||||
$backendUser = $this->getBackendUser();
|
||||
|
||||
if ($operation === 'reset-filters') {
|
||||
// Reset the module data demand object
|
||||
$this->moduleData->set('demand', []);
|
||||
$demand = null;
|
||||
}
|
||||
if ($demand === null) {
|
||||
$demand = Demand::fromUc((array)$this->moduleData->get('demand', []));
|
||||
} else {
|
||||
$this->moduleData->set('demand', $demand->forUc());
|
||||
}
|
||||
$backendUser->pushModuleData($this->moduleData->getModuleIdentifier(), $this->moduleData->toArray());
|
||||
|
||||
$compareUserList = array_keys((array)$this->moduleData->get('compareUserList', []));
|
||||
|
||||
$backendUsers = $this->backendUserRepository->findDemanded($demand);
|
||||
$paginator = new QueryResultPaginator($backendUsers, $currentPage, 50);
|
||||
$pagination = new SimplePagination($paginator);
|
||||
$backendUserGroups = $this->eventDispatcher->dispatch(
|
||||
new AfterBackendGroupFilterListIsAssembledEvent(
|
||||
$this->request,
|
||||
array_merge([''], $this->backendUserGroupRepository->findAll()->toArray())
|
||||
)
|
||||
)->backendGroups;
|
||||
|
||||
$this->moduleTemplate->assignMultiple([
|
||||
'onlineBackendUsers' => $this->getOnlineBackendUsers(),
|
||||
'demand' => $demand,
|
||||
'paginator' => $paginator,
|
||||
'pagination' => $pagination,
|
||||
'totalAmountOfBackendUsers' => $backendUsers->count(),
|
||||
'backendUserGroups' => $backendUserGroups,
|
||||
'compareUserUidList' => array_combine($compareUserList, $compareUserList),
|
||||
'currentUserUid' => $backendUser->user['uid'] ?? null,
|
||||
'compareUserList' => !empty($compareUserList) ? $this->backendUserRepository->findByUidList($compareUserList) : '',
|
||||
]);
|
||||
|
||||
$this->addMainMenu('list');
|
||||
$createEditorButton = $this->componentFactory->createLinkButton()
|
||||
->setIcon($this->iconFactory->getIcon('actions-plus', IconSize::SMALL))
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.editor.create', 'beuser'))
|
||||
->setShowLabelText(true)
|
||||
->setHref((string)$this->backendUriBuilder->buildUriFromRoute('record_edit', [
|
||||
'edit' => ['be_users' => [0 => 'new']],
|
||||
'module' => 'backend_user_management',
|
||||
'returnUrl' => $this->request->getAttribute('normalizedParams')->getRequestUri(),
|
||||
]));
|
||||
$this->moduleTemplate->addButtonToButtonBar($createEditorButton);
|
||||
$createAdminButton = $this->componentFactory->createLinkButton()
|
||||
->setIcon($this->iconFactory->getIcon('actions-plus', IconSize::SMALL))
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.admin.create', 'beuser'))
|
||||
->setShowLabelText(true)
|
||||
->setHref((string)$this->backendUriBuilder->buildUriFromRoute('record_edit', [
|
||||
'edit' => ['be_users' => [0 => 'new']],
|
||||
'returnUrl' => $this->request->getAttribute('normalizedParams')->getRequestUri(),
|
||||
'defVals' => ['be_users' => ['admin' => 1]],
|
||||
]));
|
||||
$this->moduleTemplate->addButtonToButtonBar($createAdminButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
|
||||
|
||||
$this->moduleTemplate->getDocHeaderComponent()->setShortcutContext(
|
||||
'backend_user_management',
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUsers', 'beuser'),
|
||||
['action' => 'list']
|
||||
);
|
||||
|
||||
$this->pageRenderer->loadJavaScriptModule('@typo3/backend/switch-user.js');
|
||||
|
||||
return $this->moduleTemplate->renderResponse('BackendUser/List');
|
||||
}
|
||||
|
||||
/**
|
||||
* Views all currently logged in BackendUsers and their sessions
|
||||
*/
|
||||
public function onlineAction(): ResponseInterface
|
||||
{
|
||||
$onlineUsersAndSessions = [];
|
||||
$onlineUsers = $this->backendUserRepository->findOnline();
|
||||
foreach ($onlineUsers as $onlineUser) {
|
||||
$onlineUsersAndSessions[] = [
|
||||
'backendUser' => $onlineUser,
|
||||
'sessions' => $this->backendUserSessionRepository->findByBackendUser($onlineUser),
|
||||
];
|
||||
}
|
||||
|
||||
$currentSessionId = $this->backendUserSessionRepository->getPersistedSessionIdentifier($this->getBackendUser());
|
||||
|
||||
$this->moduleTemplate->assignMultiple([
|
||||
'onlineUsersAndSessions' => $onlineUsersAndSessions,
|
||||
'currentSessionId' => $currentSessionId,
|
||||
]);
|
||||
|
||||
$this->addMainMenu('online');
|
||||
$this->moduleTemplate->getDocHeaderComponent()->setShortcutContext(
|
||||
'backend_user_management',
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:onlineUsers', 'beuser'),
|
||||
['action' => 'online']
|
||||
);
|
||||
|
||||
return $this->moduleTemplate->renderResponse('BackendUser/Online');
|
||||
}
|
||||
|
||||
public function showAction(int $uid = 0): ResponseInterface
|
||||
{
|
||||
$data = $this->userInformationService->getUserInformation($uid);
|
||||
$this->moduleTemplate->assignMultiple([
|
||||
'data' => $data,
|
||||
'showUid' => $this->getBackendUser()->shallDisplayDebugInformation(),
|
||||
]);
|
||||
|
||||
$this->addMainMenu('show');
|
||||
$this->moduleTemplate->addButtonToButtonBar($this->componentFactory->createBackButton((string)$this->backendUriBuilder->buildUriFromRoute('backend_user_management')));
|
||||
$editButton = $this->componentFactory->createLinkButton()
|
||||
->setIcon($this->iconFactory->getIcon('actions-open', IconSize::SMALL))
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.edit'))
|
||||
->setShowLabelText(true)
|
||||
->setHref((string)$this->backendUriBuilder->buildUriFromRoute('record_edit', [
|
||||
'edit' => ['be_users' => [$uid => 'edit']],
|
||||
'module' => 'backend_user_management',
|
||||
'returnUrl' => $this->request->getAttribute('normalizedParams')->getRequestUri(),
|
||||
]));
|
||||
$this->moduleTemplate->addButtonToButtonBar($editButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
|
||||
$addUserButton = $this->componentFactory->createLinkButton()
|
||||
->setIcon($this->iconFactory->getIcon('actions-plus', IconSize::SMALL))
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.backendUser.create', 'beuser'))
|
||||
->setShowLabelText(true)
|
||||
->setHref((string)$this->backendUriBuilder->buildUriFromRoute('record_edit', [
|
||||
'edit' => ['be_users' => [0 => 'new']],
|
||||
'module' => 'backend_user_management',
|
||||
'returnUrl' => $this->request->getAttribute('normalizedParams')->getRequestUri(),
|
||||
]));
|
||||
$this->moduleTemplate->addButtonToButtonBar($addUserButton, ButtonBar::BUTTON_POSITION_LEFT, 3);
|
||||
$username = empty($data['user']['username']) ? '' : ': ' . $data['user']['username'];
|
||||
$this->moduleTemplate->getDocHeaderComponent()->setShortcutContext(
|
||||
'backend_user_management',
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser', 'beuser') . $username,
|
||||
['action' => 'show', 'uid' => $uid]
|
||||
);
|
||||
|
||||
return $this->moduleTemplate->renderResponse('BackendUser/Show');
|
||||
}
|
||||
|
||||
/**
|
||||
* Compare backend users from demand
|
||||
*/
|
||||
public function compareAction(): ResponseInterface
|
||||
{
|
||||
$compareUserList = array_keys((array)$this->moduleData->get('compareUserList', []));
|
||||
if (empty($compareUserList)) {
|
||||
return $this->redirect('list');
|
||||
}
|
||||
|
||||
$compareData = [];
|
||||
foreach ($compareUserList as $uid) {
|
||||
if ($compareInformation = $this->userInformationService->getUserInformation($uid)) {
|
||||
$compareData[] = $compareInformation;
|
||||
}
|
||||
}
|
||||
|
||||
$this->moduleTemplate->assignMultiple([
|
||||
'compareUserList' => $compareData,
|
||||
'onlineBackendUsers' => $this->getOnlineBackendUsers(),
|
||||
'showUid' => $this->getBackendUser()->shallDisplayDebugInformation(),
|
||||
]);
|
||||
|
||||
$this->addMainMenu('compare');
|
||||
$this->moduleTemplate->addButtonToButtonBar($this->componentFactory->createBackButton((string)$this->backendUriBuilder->buildUriFromRoute('backend_user_management')));
|
||||
$this->moduleTemplate->getDocHeaderComponent()->setShortcutContext(
|
||||
'backend_user_management',
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compareBackendUsers', 'beuser'),
|
||||
['action' => 'compare']
|
||||
);
|
||||
|
||||
return $this->moduleTemplate->renderResponse('BackendUser/Compare');
|
||||
}
|
||||
|
||||
protected function initializeInitiatePasswordResetAction(): void
|
||||
{
|
||||
$this->assertAllowedHttpMethod($this->request, 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
* Starts the password reset process for a selected user.
|
||||
*/
|
||||
public function initiatePasswordResetAction(int $user): ResponseInterface
|
||||
{
|
||||
$context = GeneralUtility::makeInstance(Context::class);
|
||||
/** @var BackendUser|null $userObject */
|
||||
$userObject = $this->backendUserRepository->findByUid($user);
|
||||
if (!$userObject || !$userObject->isPasswordResetEnabled() || !$context->getAspect('backend.user')->isAdmin()) {
|
||||
// Add an error message
|
||||
$this->addFlashMessage(
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:flashMessage.resetPassword.error.text', 'beuser') ?? '',
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:flashMessage.resetPassword.error.title', 'beuser') ?? '',
|
||||
ContextualFeedbackSeverity::ERROR
|
||||
);
|
||||
} else {
|
||||
GeneralUtility::makeInstance(PasswordReset::class)->initiateReset(
|
||||
$this->request,
|
||||
$context,
|
||||
$userObject->getEmail()
|
||||
);
|
||||
$this->addFlashMessage(
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:flashMessage.resetPassword.success.text', 'beuser', [$userObject->getEmail()]) ?? '',
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:flashMessage.resetPassword.success.title', 'beuser') ?? ''
|
||||
);
|
||||
}
|
||||
return $this->redirect('list');
|
||||
}
|
||||
|
||||
protected function initializeAddToCompareListAction(): void
|
||||
{
|
||||
$this->assertAllowedHttpMethod($this->request, 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
* Attaches one backend user to the compare list
|
||||
*/
|
||||
public function addToCompareListAction(int $uid): ResponseInterface
|
||||
{
|
||||
$this->addToCompareList('compareUserList', $uid);
|
||||
return $this->redirect('list');
|
||||
}
|
||||
|
||||
protected function initializeRemoveFromCompareListAction(): void
|
||||
{
|
||||
$this->assertAllowedHttpMethod($this->request, 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes given backend user to the compare list
|
||||
*/
|
||||
public function removeFromCompareListAction(int $uid, int $redirectToCompare = 0): ResponseInterface
|
||||
{
|
||||
$this->removeFromCompareList('compareUserList', $uid);
|
||||
if ($redirectToCompare) {
|
||||
return $this->redirect('compare');
|
||||
}
|
||||
return $this->redirect('list');
|
||||
}
|
||||
|
||||
protected function initializeRemoveAllFromCompareListAction(): void
|
||||
{
|
||||
$this->assertAllowedHttpMethod($this->request, 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all backend users from the compare list
|
||||
*/
|
||||
public function removeAllFromCompareListAction(): ResponseInterface
|
||||
{
|
||||
$this->cleanCompareList('compareUserList');
|
||||
return $this->redirect('list');
|
||||
}
|
||||
|
||||
protected function initializeTerminateBackendUserSessionAction(): void
|
||||
{
|
||||
$this->assertAllowedHttpMethod($this->request, 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
* Terminate BackendUser session and logout corresponding client
|
||||
* Redirects to onlineAction with message
|
||||
*/
|
||||
protected function terminateBackendUserSessionAction(string $sessionId): ResponseInterface
|
||||
{
|
||||
// terminating value of persisted session ID
|
||||
$success = $this->backendUserSessionRepository->terminateSessionByIdentifier($sessionId);
|
||||
if ($success) {
|
||||
$this->addFlashMessage(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.online.flashMessage.terminateSessionSuccess', 'beuser') ?? '');
|
||||
}
|
||||
return $this->redirect('online');
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays all BackendUserGroups
|
||||
*/
|
||||
public function groupsAction(?BackendUserGroup $userGroupDto = null, int $currentPage = 1, string $operation = ''): ResponseInterface
|
||||
{
|
||||
$backendUser = $this->getBackendUser();
|
||||
|
||||
if ($operation === 'reset-filters') {
|
||||
$this->moduleData->set('userGroupDto', []);
|
||||
$userGroupDto = null;
|
||||
}
|
||||
|
||||
if ($userGroupDto === null) {
|
||||
$userGroupDto = BackendUserGroup::fromUc((array)$this->moduleData->get('userGroupDto', []));
|
||||
} else {
|
||||
$this->moduleData->set('userGroupDto', $userGroupDto->forUc());
|
||||
}
|
||||
|
||||
$backendUser->pushModuleData($this->moduleData->getModuleIdentifier(), $this->moduleData->toArray());
|
||||
|
||||
$backendUserGroups = $this->backendUserGroupRepository->findByFilter($userGroupDto);
|
||||
$paginator = new QueryResultPaginator($backendUserGroups, $currentPage, 50);
|
||||
$pagination = new SimplePagination($paginator);
|
||||
$compareGroupUidList = array_keys((array)$this->moduleData->get('compareGroupUidList', []));
|
||||
$this->moduleTemplate->assignMultiple(
|
||||
[
|
||||
'paginator' => $paginator,
|
||||
'pagination' => $pagination,
|
||||
'totalAmountOfBackendUserGroups' => $backendUserGroups->count(),
|
||||
'compareGroupUidList' => array_map(static function (int $value): int { // uid as key and force value to 1
|
||||
return 1;
|
||||
}, array_flip($compareGroupUidList)),
|
||||
'compareGroupList' => !empty($compareGroupUidList) ? $this->backendUserGroupRepository->findByUidList($compareGroupUidList) : [],
|
||||
'userGroupDto' => $userGroupDto,
|
||||
]
|
||||
);
|
||||
|
||||
$this->addMainMenu('groups');
|
||||
$addGroupButton = $this->componentFactory->createLinkButton()
|
||||
->setIcon($this->iconFactory->getIcon('actions-plus', IconSize::SMALL))
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.backendUserGroup.create', 'beuser'))
|
||||
->setShowLabelText(true)
|
||||
->setHref((string)$this->backendUriBuilder->buildUriFromRoute('record_edit', [
|
||||
'edit' => ['be_groups' => [0 => 'new']],
|
||||
'module' => 'backend_user_management',
|
||||
'returnUrl' => $this->request->getAttribute('normalizedParams')->getRequestUri(),
|
||||
]));
|
||||
$this->moduleTemplate->addButtonToButtonBar($addGroupButton);
|
||||
$this->moduleTemplate->getDocHeaderComponent()->setShortcutContext(
|
||||
'backend_user_management',
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroupsMenu', 'beuser'),
|
||||
['action' => 'groups']
|
||||
);
|
||||
|
||||
return $this->moduleTemplate->renderResponse('BackendUserGroup/List');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show a single backend user group.
|
||||
*/
|
||||
public function showGroupAction(int $uid = 0): ResponseInterface
|
||||
{
|
||||
$data = $this->userInformationService->getGroupInformation($uid);
|
||||
$this->moduleTemplate->assignMultiple([
|
||||
'data' => $data,
|
||||
'showUid' => $this->getBackendUser()->shallDisplayDebugInformation(),
|
||||
]);
|
||||
|
||||
$this->addMainMenu('showGroup');
|
||||
$this->moduleTemplate->addButtonToButtonBar($this->componentFactory->createBackButton((string)$this->backendUriBuilder->buildUriFromRoute('backend_user_management', ['action' => 'groups'])));
|
||||
$editButton = $this->componentFactory->createLinkButton()
|
||||
->setIcon($this->iconFactory->getIcon('actions-open', IconSize::SMALL))
|
||||
->setTitle(
|
||||
LocalizationUtility::translate(
|
||||
'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.edit'
|
||||
)
|
||||
)
|
||||
->setShowLabelText(true)
|
||||
->setHref((string)$this->backendUriBuilder->buildUriFromRoute('record_edit', [
|
||||
'edit' => ['be_groups' => [$uid => 'edit']],
|
||||
'returnUrl' => $this->request->getAttribute('normalizedParams')->getRequestUri(),
|
||||
]));
|
||||
$this->moduleTemplate->addButtonToButtonBar($editButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
|
||||
$addUserButton = $this->componentFactory->createLinkButton()
|
||||
->setIcon($this->iconFactory->getIcon('actions-plus', IconSize::SMALL))
|
||||
->setTitle(
|
||||
LocalizationUtility::translate(
|
||||
'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.backendUserGroup.create',
|
||||
'beuser'
|
||||
)
|
||||
)
|
||||
->setShowLabelText(true)
|
||||
->setHref((string)$this->backendUriBuilder->buildUriFromRoute('record_edit', [
|
||||
'edit' => ['be_groups' => [0 => 'new']],
|
||||
'returnUrl' => $this->request->getAttribute('normalizedParams')->getRequestUri(),
|
||||
]));
|
||||
$this->moduleTemplate->addButtonToButtonBar($addUserButton, ButtonBar::BUTTON_POSITION_LEFT, 3);
|
||||
$backendGroupTitle = empty($data['group']['title']) ? '' : ': ' . $data['group']['title'];
|
||||
$this->moduleTemplate->getDocHeaderComponent()->setShortcutContext(
|
||||
'backend_user_management',
|
||||
LocalizationUtility::translate(
|
||||
'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup',
|
||||
'beuser'
|
||||
) . $backendGroupTitle,
|
||||
['action' => 'showGroup', 'uid' => $uid]
|
||||
);
|
||||
|
||||
return $this->moduleTemplate->renderResponse('BackendUserGroup/Show');
|
||||
}
|
||||
|
||||
public function compareGroupsAction(): ResponseInterface
|
||||
{
|
||||
$compareGroupUidList = array_keys((array)$this->moduleData->get('compareGroupUidList', []));
|
||||
|
||||
$compareData = [];
|
||||
foreach ($compareGroupUidList as $uid) {
|
||||
if ($compareInformation = $this->userInformationService->getGroupInformation($uid)) {
|
||||
$compareData[] = $compareInformation;
|
||||
}
|
||||
}
|
||||
if (empty($compareData)) {
|
||||
return $this->redirect('groups');
|
||||
}
|
||||
|
||||
$this->moduleTemplate->assignMultiple([
|
||||
'compareGroupList' => $compareData,
|
||||
'showUid' => $this->getBackendUser()->shallDisplayDebugInformation(),
|
||||
]);
|
||||
|
||||
$this->addMainMenu('compareGroups');
|
||||
$this->moduleTemplate->addButtonToButtonBar($this->componentFactory->createBackButton($this->uriBuilder->uriFor('groups')));
|
||||
$this->moduleTemplate->getDocHeaderComponent()->setShortcutContext(
|
||||
'backend_user_management',
|
||||
LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compareBackendUsersGroups', 'beuser'),
|
||||
['action' => 'compareGroups']
|
||||
);
|
||||
|
||||
return $this->moduleTemplate->renderResponse('BackendUserGroup/Compare');
|
||||
}
|
||||
|
||||
protected function initializeAddGroupToCompareListAction(): void
|
||||
{
|
||||
$this->assertAllowedHttpMethod($this->request, 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
* Attaches one backend user group to the compare list
|
||||
*/
|
||||
public function addGroupToCompareListAction(int $uid): ResponseInterface
|
||||
{
|
||||
$this->addToCompareList('compareGroupUidList', $uid);
|
||||
return $this->redirect('groups');
|
||||
}
|
||||
|
||||
protected function initializeRemoveGroupFromCompareListAction(): void
|
||||
{
|
||||
$this->assertAllowedHttpMethod($this->request, 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes given backend user group to the compare list
|
||||
*/
|
||||
public function removeGroupFromCompareListAction(int $uid, int $redirectToCompare = 0): ResponseInterface
|
||||
{
|
||||
$this->removeFromCompareList('compareGroupUidList', $uid);
|
||||
if ($redirectToCompare) {
|
||||
return $this->redirect('compareGroups');
|
||||
}
|
||||
return $this->redirect('groups');
|
||||
}
|
||||
|
||||
protected function initializeRemoveAllGroupsFromCompareListAction(): void
|
||||
{
|
||||
$this->assertAllowedHttpMethod($this->request, 'POST');
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all backend user groups from the compare list
|
||||
*/
|
||||
public function removeAllGroupsFromCompareListAction(): ResponseInterface
|
||||
{
|
||||
$this->cleanCompareList('compareGroupUidList');
|
||||
return $this->redirect('groups');
|
||||
}
|
||||
|
||||
protected function filemountsAction(int $currentPage = 1): ResponseInterface
|
||||
{
|
||||
$filemounts = $this->eventDispatcher->dispatch(
|
||||
new AfterFilemountsListIsAssembledEvent(
|
||||
$this->request,
|
||||
$this->fileMountRepository->findAll()->toArray()
|
||||
)
|
||||
)->filemounts;
|
||||
|
||||
$this->addMainMenu('filemounts');
|
||||
|
||||
$paginator = new ArrayPaginator($filemounts, $currentPage, 50);
|
||||
$pagination = new SimplePagination($paginator);
|
||||
$this->moduleTemplate->assignMultiple(
|
||||
[
|
||||
'paginator' => $paginator,
|
||||
'pagination' => $pagination,
|
||||
'totalAmountOfFilemounts' => count($filemounts),
|
||||
]
|
||||
);
|
||||
|
||||
$addFilemountButton = $this->componentFactory->createLinkButton()
|
||||
->setIcon($this->iconFactory->getIcon('actions-plus', IconSize::SMALL))
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemount.create', 'beuser'))
|
||||
->setShowLabelText(true)
|
||||
->setHref((string)$this->backendUriBuilder->buildUriFromRoute('record_edit', [
|
||||
'edit' => ['sys_filemounts' => [0 => 'new']],
|
||||
'module' => 'backend_user_management',
|
||||
'returnUrl' => $this->request->getAttribute('normalizedParams')->getRequestUri(),
|
||||
]));
|
||||
$this->moduleTemplate->addButtonToButtonBar($addFilemountButton);
|
||||
|
||||
return $this->moduleTemplate->renderResponse('Filemount/List');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an array with the uids of online users as the keys
|
||||
* [
|
||||
* 1 => true,
|
||||
* 5 => true
|
||||
* ]
|
||||
*/
|
||||
protected function getOnlineBackendUsers(): array
|
||||
{
|
||||
$onlineUsers = $this->backendUserSessionRepository->findAllActive();
|
||||
$onlineBackendUsers = [];
|
||||
foreach ($onlineUsers as $onlineUser) {
|
||||
$onlineBackendUsers[$onlineUser['ses_userid']] = true;
|
||||
}
|
||||
return $onlineBackendUsers;
|
||||
}
|
||||
|
||||
/**
|
||||
* Doc header main drop down
|
||||
*/
|
||||
protected function addMainMenu(string $currentAction): void
|
||||
{
|
||||
$this->uriBuilder->setRequest($this->request);
|
||||
$menu = $this->componentFactory->createMenu();
|
||||
$menu->setIdentifier('BackendUserModuleMenu');
|
||||
$menu->setLabel(
|
||||
LocalizationUtility::translate(
|
||||
'LLL:EXT:backend/Resources/Private/Language/locallang.xlf:modulemenu.label',
|
||||
'backend',
|
||||
)
|
||||
);
|
||||
$menu->addMenuItem(
|
||||
$this->componentFactory->createMenuItem()
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUsers', 'beuser'))
|
||||
->setHref($this->uriBuilder->uriFor('list'))
|
||||
->setActive($currentAction === 'list')
|
||||
);
|
||||
if ($currentAction === 'show') {
|
||||
$menu->addMenuItem(
|
||||
$this->componentFactory->createMenuItem()
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserDetails', 'beuser'))
|
||||
->setHref($this->uriBuilder->uriFor('show'))
|
||||
->setActive(true)
|
||||
);
|
||||
}
|
||||
if ($currentAction === 'compare') {
|
||||
$menu->addMenuItem(
|
||||
$this->componentFactory->createMenuItem()
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compareBackendUsers', 'beuser'))
|
||||
->setHref($this->uriBuilder->uriFor('list'))
|
||||
->setActive(true)
|
||||
);
|
||||
}
|
||||
$menu->addMenuItem(
|
||||
$this->componentFactory->createMenuItem()
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroupsMenu', 'beuser'))
|
||||
->setHref($this->uriBuilder->uriFor('groups'))
|
||||
->setActive($currentAction === 'groups')
|
||||
);
|
||||
if ($currentAction === 'showGroup') {
|
||||
$menu->addMenuItem(
|
||||
$this->componentFactory->createMenuItem()
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroupDetails', 'beuser'))
|
||||
->setHref($this->uriBuilder->uriFor('showGroup'))
|
||||
->setActive(true)
|
||||
);
|
||||
}
|
||||
if ($currentAction === 'compareGroups') {
|
||||
$menu->addMenuItem(
|
||||
$this->componentFactory->createMenuItem()
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compareBackendUsersGroups', 'beuser'))
|
||||
->setHref($this->uriBuilder->uriFor('compareGroups'))
|
||||
->setActive(true)
|
||||
);
|
||||
}
|
||||
$menu->addMenuItem(
|
||||
$this->componentFactory->createMenuItem()
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:onlineUsers', 'beuser'))
|
||||
->setHref($this->uriBuilder->uriFor('online'))
|
||||
->setActive($currentAction === 'online')
|
||||
);
|
||||
$menu->addMenuItem(
|
||||
$this->componentFactory->createMenuItem()
|
||||
->setTitle(LocalizationUtility::translate('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemounts', 'beuser'))
|
||||
->setHref($this->uriBuilder->uriFor('filemounts'))
|
||||
->setActive($currentAction === 'filemounts')
|
||||
);
|
||||
$this->moduleTemplate->getDocHeaderComponent()->getMenuRegistry()->addMenu($menu);
|
||||
}
|
||||
|
||||
/**
|
||||
* Attaches the given uid to the requested compare list
|
||||
*/
|
||||
protected function addToCompareList(string $listIdentifier, int $uid): void
|
||||
{
|
||||
$compareList = (array)$this->moduleData->get($listIdentifier, []);
|
||||
$compareList[$uid] = true;
|
||||
$this->moduleData->set($listIdentifier, $compareList);
|
||||
$this->getBackendUser()->pushModuleData($this->moduleData->getModuleIdentifier(), $this->moduleData->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the given uid from the requested compare list
|
||||
*/
|
||||
protected function removeFromCompareList(string $listIdentifier, int $uid): void
|
||||
{
|
||||
$compareList = (array)$this->moduleData->get($listIdentifier, []);
|
||||
unset($compareList[$uid]);
|
||||
$this->moduleData->set($listIdentifier, $compareList);
|
||||
$this->getBackendUser()->pushModuleData($this->moduleData->getModuleIdentifier(), $this->moduleData->toArray());
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes all items from the requested compare list
|
||||
*/
|
||||
protected function cleanCompareList(string $listIdentifier): void
|
||||
{
|
||||
$this->moduleData->set($listIdentifier, []);
|
||||
$this->getBackendUser()->pushModuleData($this->moduleData->getModuleIdentifier(), $this->moduleData->toArray());
|
||||
}
|
||||
|
||||
protected function getBackendUser(): BackendUserAuthentication
|
||||
{
|
||||
return $GLOBALS['BE_USER'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,548 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Controller;
|
||||
|
||||
use Psr\Http\Message\ResponseFactoryInterface;
|
||||
use Psr\Http\Message\ResponseInterface;
|
||||
use Psr\Http\Message\ServerRequestInterface;
|
||||
use TYPO3\CMS\Backend\Attribute\AsController;
|
||||
use TYPO3\CMS\Backend\Routing\UriBuilder;
|
||||
use TYPO3\CMS\Backend\Template\Components\ButtonBar;
|
||||
use TYPO3\CMS\Backend\Template\Components\ComponentFactory;
|
||||
use TYPO3\CMS\Backend\Template\ModuleTemplate;
|
||||
use TYPO3\CMS\Backend\Template\ModuleTemplateFactory;
|
||||
use TYPO3\CMS\Backend\Tree\View\PageTreeView;
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
use TYPO3\CMS\Backend\View\BackendViewFactory;
|
||||
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
|
||||
use TYPO3\CMS\Core\DataHandling\DataHandler;
|
||||
use TYPO3\CMS\Core\Imaging\IconFactory;
|
||||
use TYPO3\CMS\Core\Imaging\IconSize;
|
||||
use TYPO3\CMS\Core\Localization\LanguageService;
|
||||
use TYPO3\CMS\Core\Messaging\FlashMessage;
|
||||
use TYPO3\CMS\Core\Messaging\FlashMessageService;
|
||||
use TYPO3\CMS\Core\Page\PageRenderer;
|
||||
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Backend module page permissions. This is the "Access" module in main module.
|
||||
* Also includes the ajax endpoint for convenient methods for editing
|
||||
* of page permissions (including page ownership (user and group)).
|
||||
*
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
*/
|
||||
#[AsController]
|
||||
class PermissionController
|
||||
{
|
||||
private const string SESSION_PREFIX = 'tx_Beuser_';
|
||||
private const array DEPTH_LEVELS = [1, 2, 3, 4, 10];
|
||||
private const int RECURSIVE_LEVELS = 10;
|
||||
|
||||
protected int $id = 0;
|
||||
protected string $returnUrl = '';
|
||||
protected int $depth;
|
||||
protected array $pageInfo = [];
|
||||
|
||||
public function __construct(
|
||||
protected readonly ComponentFactory $componentFactory,
|
||||
protected readonly ModuleTemplateFactory $moduleTemplateFactory,
|
||||
protected readonly PageRenderer $pageRenderer,
|
||||
protected readonly IconFactory $iconFactory,
|
||||
protected readonly UriBuilder $uriBuilder,
|
||||
protected readonly ResponseFactoryInterface $responseFactory,
|
||||
protected readonly BackendViewFactory $backendViewFactory,
|
||||
protected readonly FlashMessageService $flashMessageService,
|
||||
) {}
|
||||
|
||||
public function handleRequest(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
$parsedBody = $request->getParsedBody();
|
||||
$queryParams = $request->getQueryParams();
|
||||
$backendUser = $this->getBackendUser();
|
||||
$lang = $this->getLanguageService();
|
||||
|
||||
// determine depth parameter
|
||||
$this->depth = (int)($parsedBody['depth'] ?? $queryParams['depth'] ?? 0);
|
||||
if (!$this->depth) {
|
||||
$this->depth = (int)$backendUser->getSessionData(self::SESSION_PREFIX . 'depth');
|
||||
} else {
|
||||
$backendUser->setAndSaveSessionData(self::SESSION_PREFIX . 'depth', $this->depth);
|
||||
}
|
||||
|
||||
// determine id parameter
|
||||
$this->id = (int)($parsedBody['id'] ?? $queryParams['id'] ?? 0);
|
||||
$pageRecord = BackendUtility::getRecord('pages', $this->id);
|
||||
// Check if a page with the given id exists, otherwise fall back
|
||||
if ($pageRecord === null) {
|
||||
$this->id = 0;
|
||||
}
|
||||
|
||||
$this->returnUrl = GeneralUtility::sanitizeLocalUrl((string)($parsedBody['returnUrl'] ?? $queryParams['returnUrl'] ?? ''), $request);
|
||||
$this->pageInfo = BackendUtility::readPageAccess($this->id, ' 1=1') ?: [
|
||||
'title' => $GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename'],
|
||||
'uid' => 0,
|
||||
'pid' => 0,
|
||||
];
|
||||
|
||||
$action = (string)($parsedBody['action'] ?? $queryParams['action'] ?? 'index');
|
||||
|
||||
if ($action === 'update') {
|
||||
// Update returns a redirect. No further fiddling with view here, return directly.
|
||||
return $this->updateAction($request);
|
||||
}
|
||||
|
||||
$view = $this->moduleTemplateFactory->create($request);
|
||||
if ($backendUser->workspace !== 0) {
|
||||
$this->addFlashMessage(
|
||||
$lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:WorkspaceWarningText'),
|
||||
$lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:WorkspaceWarning'),
|
||||
ContextualFeedbackSeverity::WARNING
|
||||
);
|
||||
}
|
||||
$this->registerDocHeaderButtons($view, $action);
|
||||
$view->setTitle(
|
||||
$this->getLanguageService()->translate('title', 'beuser.modules.permissions'),
|
||||
$this->id !== 0 && !empty($this->pageInfo['title']) ? $this->pageInfo['title'] : ''
|
||||
);
|
||||
$view->getDocHeaderComponent()->setPageBreadcrumb($this->pageInfo);
|
||||
|
||||
if ($action === 'edit') {
|
||||
return $this->editAction($view);
|
||||
}
|
||||
return $this->indexAction($view, $request);
|
||||
}
|
||||
|
||||
public function handleAjaxRequest(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
$parsedBody = $request->getParsedBody();
|
||||
$conf = [
|
||||
'page' => $parsedBody['page'] ?? null,
|
||||
'who' => $parsedBody['who'] ?? null,
|
||||
'mode' => $parsedBody['mode'] ?? null,
|
||||
'bits' => (int)($parsedBody['bits'] ?? 0),
|
||||
'permissions' => (int)($parsedBody['permissions'] ?? 0),
|
||||
'action' => $parsedBody['action'] ?? null,
|
||||
'ownerUid' => (int)($parsedBody['ownerUid'] ?? 0),
|
||||
'username' => $parsedBody['username'] ?? null,
|
||||
'groupUid' => (int)($parsedBody['groupUid'] ?? 0),
|
||||
'groupname' => $parsedBody['groupname'] ?? '',
|
||||
'editLockState' => (int)($parsedBody['editLockState'] ?? 0),
|
||||
'new_owner_uid' => (int)($parsedBody['newOwnerUid'] ?? 0),
|
||||
'new_group_uid' => (int)($parsedBody['newGroupUid'] ?? 0),
|
||||
];
|
||||
|
||||
// Basic test for required value
|
||||
if ($conf['page'] <= 0) {
|
||||
return $this->htmlResponse('This script cannot be called directly', 500);
|
||||
}
|
||||
|
||||
// Initialize view and always assign current page id
|
||||
$view = $this->backendViewFactory->create($request);
|
||||
$view->assign('pageId', $conf['page']);
|
||||
|
||||
// Initialize TCE for execution of updates
|
||||
$tce = GeneralUtility::makeInstance(DataHandler::class);
|
||||
// Determine the action to execute
|
||||
switch ($conf['action'] ?? '') {
|
||||
case 'show_change_owner_selector':
|
||||
$template = 'Permission/ChangeOwnerSelector';
|
||||
$users = BackendUtility::getUserNames();
|
||||
$view->assignMultiple([
|
||||
'elementId' => 'o_' . $conf['page'],
|
||||
'ownerUid' => $conf['ownerUid'],
|
||||
'username' => $conf['username'],
|
||||
'users' => $users,
|
||||
'addCurrentUser' => !isset($users[$conf['ownerUid']]),
|
||||
]);
|
||||
break;
|
||||
case 'show_change_group_selector':
|
||||
$template = 'Permission/ChangeGroupSelector';
|
||||
$groups = BackendUtility::getGroupNames();
|
||||
$view->assignMultiple([
|
||||
'elementId' => 'g_' . $conf['page'],
|
||||
'groupUid' => $conf['groupUid'],
|
||||
'groupname' => $conf['groupname'],
|
||||
'groups' => $groups,
|
||||
'addCurrentGroup' => !isset($groups[$conf['groupUid']]),
|
||||
]);
|
||||
break;
|
||||
case 'toggle_edit_lock':
|
||||
// Initialize requested lock state
|
||||
$editLockState = $conf['editLockState'] ? 0 : 1;
|
||||
|
||||
// Execute TCE Update
|
||||
$tce->start([
|
||||
'pages' => [
|
||||
$conf['page'] => [
|
||||
'editlock' => $editLockState,
|
||||
],
|
||||
],
|
||||
], []);
|
||||
$tce->process_datamap();
|
||||
|
||||
// Setup view
|
||||
$template = 'Permission/ToggleEditLock';
|
||||
$view->assignMultiple([
|
||||
'elementId' => 'el_' . $conf['page'],
|
||||
'editLockState' => $editLockState,
|
||||
]);
|
||||
break;
|
||||
case 'change_owner':
|
||||
// Check if new owner uid is given (also accept 0 => [not set])
|
||||
if ($conf['new_owner_uid'] < 0) {
|
||||
return $this->htmlResponse('An error occurred: No page owner uid specified', 500);
|
||||
}
|
||||
|
||||
// Execute TCE Update
|
||||
$tce->start([
|
||||
'pages' => [
|
||||
$conf['page'] => [
|
||||
'perms_userid' => $conf['new_owner_uid'],
|
||||
],
|
||||
],
|
||||
], []);
|
||||
$tce->process_datamap();
|
||||
|
||||
// Setup and render view
|
||||
$template = 'Permission/ChangeOwner';
|
||||
$view->assignMultiple([
|
||||
'userId' => $conf['new_owner_uid'],
|
||||
'username' => BackendUtility::getUserNames(
|
||||
'username',
|
||||
' AND uid = ' . $conf['new_owner_uid']
|
||||
)[$conf['new_owner_uid']]['username'] ?? '',
|
||||
]);
|
||||
break;
|
||||
case 'change_group':
|
||||
// Check if new group uid is given (also accept 0 => [not set])
|
||||
if ($conf['new_group_uid'] < 0) {
|
||||
return $this->htmlResponse('An error occurred: No page group uid specified', 500);
|
||||
}
|
||||
|
||||
// Execute TCE Update
|
||||
$tce->start([
|
||||
'pages' => [
|
||||
$conf['page'] => [
|
||||
'perms_groupid' => $conf['new_group_uid'],
|
||||
],
|
||||
],
|
||||
], []);
|
||||
$tce->process_datamap();
|
||||
|
||||
// Setup and render view
|
||||
$template = 'Permission/ChangeGroup';
|
||||
$view->assignMultiple([
|
||||
'groupId' => $conf['new_group_uid'],
|
||||
'groupname' => BackendUtility::getGroupNames(
|
||||
'title',
|
||||
' AND uid = ' . $conf['new_group_uid']
|
||||
)[$conf['new_group_uid']]['title'] ?? '',
|
||||
]);
|
||||
break;
|
||||
default:
|
||||
// Initialize permissions state
|
||||
if ($conf['mode'] === 'delete') {
|
||||
$conf['permissions'] -= $conf['bits'];
|
||||
} else {
|
||||
$conf['permissions'] += $conf['bits'];
|
||||
}
|
||||
|
||||
// Execute TCE Update
|
||||
$tce->start([
|
||||
'pages' => [
|
||||
$conf['page'] => [
|
||||
'perms_' . $conf['who'] => $conf['permissions'],
|
||||
],
|
||||
],
|
||||
], []);
|
||||
$tce->process_datamap();
|
||||
|
||||
// Setup and render view
|
||||
$template = 'Permission/ChangePermission';
|
||||
$view->assignMultiple([
|
||||
'permission' => $conf['permissions'],
|
||||
'scope' => $conf['who'],
|
||||
]);
|
||||
}
|
||||
|
||||
return $this->htmlResponse($view->render($template));
|
||||
}
|
||||
|
||||
public function indexAction(ModuleTemplate $view, ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
$view->assignMultiple([
|
||||
'currentId' => $this->id,
|
||||
'viewTree' => $this->getTree(),
|
||||
'beUsers' => BackendUtility::getUserNames(),
|
||||
'beGroups' => BackendUtility::getGroupNames(),
|
||||
'depth' => $this->depth,
|
||||
'depthBaseUrl' => $this->uriBuilder->buildUriFromRoute('permissions_pages', [
|
||||
'id' => $this->id,
|
||||
'depth' => '${value}',
|
||||
'action' => 'index',
|
||||
]),
|
||||
'returnUrl' => (string)$this->uriBuilder->buildUriFromRoute('permissions_pages', [
|
||||
'id' => $this->id,
|
||||
'depth' => $this->depth,
|
||||
'action' => 'index',
|
||||
]),
|
||||
]);
|
||||
|
||||
return $view->renderResponse('Permission/Index');
|
||||
}
|
||||
|
||||
public function editAction(ModuleTemplate $view): ResponseInterface
|
||||
{
|
||||
$lang = $this->getLanguageService();
|
||||
$selectNone = $lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:selectNone');
|
||||
$selectUnchanged = $lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:selectUnchanged');
|
||||
|
||||
// Owner selector
|
||||
$beUserDataArray = [0 => $selectNone];
|
||||
foreach (BackendUtility::getUserNames() as $uid => $row) {
|
||||
$beUserDataArray[$uid] = $row['username'] ?? '';
|
||||
}
|
||||
$beUserDataArray[-1] = $selectUnchanged;
|
||||
|
||||
// Group selector
|
||||
$beGroupDataArray = [0 => $selectNone];
|
||||
foreach (BackendUtility::getGroupNames() as $uid => $row) {
|
||||
$beGroupDataArray[$uid] = $row['title'] ?? '';
|
||||
}
|
||||
$beGroupDataArray[-1] = $selectUnchanged;
|
||||
|
||||
$view->assignMultiple([
|
||||
'id' => $this->id,
|
||||
'depth' => $this->depth,
|
||||
'currentBeUser' => $this->pageInfo['perms_userid'] ?? 0,
|
||||
'beUserData' => $beUserDataArray,
|
||||
'currentBeGroup' => $this->pageInfo['perms_groupid'] ?? 0,
|
||||
'beGroupData' => $beGroupDataArray,
|
||||
'pageInfo' => $this->pageInfo,
|
||||
'returnUrl' => $this->returnUrl,
|
||||
'recursiveSelectOptions' => $this->getRecursiveSelectOptions(),
|
||||
'formAction' => (string)$this->uriBuilder->buildUriFromRoute('permissions_pages', [
|
||||
'action' => 'update',
|
||||
'id' => $this->id,
|
||||
'depth' => $this->depth,
|
||||
'returnUrl' => $this->returnUrl,
|
||||
]),
|
||||
]);
|
||||
|
||||
return $view->renderResponse('Permission/Edit');
|
||||
}
|
||||
|
||||
protected function updateAction(ServerRequestInterface $request): ResponseInterface
|
||||
{
|
||||
$data = (array)($request->getParsedBody()['data'] ?? []);
|
||||
$mirror = (array)($request->getParsedBody()['mirror'] ?? []);
|
||||
|
||||
$dataHandlerInput = [];
|
||||
// Prepare the input data for data handler
|
||||
$dataPages = $data['pages'] ?? null;
|
||||
if (is_array($dataPages) && $dataPages !== []) {
|
||||
foreach ($dataPages as $pageUid => $properties) {
|
||||
// if the owner and group field shouldn't be touched, unset the option
|
||||
if ((int)($properties['perms_userid'] ?? 0) === -1) {
|
||||
unset($properties['perms_userid']);
|
||||
}
|
||||
if ((int)($properties['perms_groupid'] ?? 0) === -1) {
|
||||
unset($properties['perms_groupid']);
|
||||
}
|
||||
$dataHandlerInput[$pageUid] = $properties;
|
||||
if (!empty($mirror['pages'][$pageUid])) {
|
||||
$mirrorPages = GeneralUtility::intExplode(',', (string)$mirror['pages'][$pageUid]);
|
||||
foreach ($mirrorPages as $mirrorPageUid) {
|
||||
$dataHandlerInput[$mirrorPageUid] = $properties;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$dataHandler = GeneralUtility::makeInstance(DataHandler::class);
|
||||
$dataHandler->start(
|
||||
[
|
||||
'pages' => $dataHandlerInput,
|
||||
],
|
||||
[]
|
||||
);
|
||||
$dataHandler->process_datamap();
|
||||
|
||||
return $this->responseFactory->createResponse(303)
|
||||
->withHeader('location', $this->returnUrl);
|
||||
}
|
||||
|
||||
protected function registerDocHeaderButtons(ModuleTemplate $view, string $action): void
|
||||
{
|
||||
$lang = $this->getLanguageService();
|
||||
|
||||
if ($action === 'edit') {
|
||||
// CLOSE button:
|
||||
if ($this->returnUrl !== '') {
|
||||
$view->addButtonToButtonBar($this->componentFactory->createCloseButton($this->returnUrl));
|
||||
}
|
||||
|
||||
// SAVE button:
|
||||
$saveButton = $this->componentFactory
|
||||
->createSaveButton('PermissionControllerEdit')
|
||||
->setName('_save')
|
||||
->setTitle($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:rm.saveCloseDoc'));
|
||||
$view->addButtonToButtonBar($saveButton, ButtonBar::BUTTON_POSITION_LEFT, 2);
|
||||
}
|
||||
|
||||
if ($action === 'index' && count($this->getDepthOptions()) > 0) {
|
||||
$viewModeItems = [];
|
||||
$viewModeItems[] = $this->componentFactory->createDropDownHeader()
|
||||
->setLabel($lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Depth'));
|
||||
foreach ($this->getDepthOptions() as $value => $label) {
|
||||
$viewModeItems[] = $this->componentFactory->createDropDownRadio()
|
||||
->setActive($this->depth === $value)
|
||||
->setLabel($label)
|
||||
->setHref((string)$this->uriBuilder->buildUriFromRoute('permissions_pages', [
|
||||
'id' => $this->id,
|
||||
'depth' => $value,
|
||||
]));
|
||||
}
|
||||
$viewModeButton = $this->componentFactory->createDropDownButton()
|
||||
->setLabel($lang->sL('LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.view'))
|
||||
->setIcon($this->iconFactory->getIcon('actions-cog'))
|
||||
->setShowLabelText(true);
|
||||
foreach ($viewModeItems as $viewModeItem) {
|
||||
$viewModeButton->addItem($viewModeItem);
|
||||
}
|
||||
$view->addButtonToButtonBar($viewModeButton, ButtonBar::BUTTON_POSITION_RIGHT, 2);
|
||||
}
|
||||
|
||||
$view->getDocHeaderComponent()->setShortcutContext(
|
||||
'permissions_pages',
|
||||
$this->getShortcutTitle(),
|
||||
['id' => $this->id, 'action' => $action]
|
||||
);
|
||||
}
|
||||
|
||||
protected function getTree(): array
|
||||
{
|
||||
$tree = GeneralUtility::makeInstance(PageTreeView::class);
|
||||
$tree->init();
|
||||
|
||||
// Create the tree from $this->id
|
||||
if ($this->id) {
|
||||
$icon = $this->iconFactory->getIconForRecord('pages', $this->pageInfo, IconSize::SMALL);
|
||||
} else {
|
||||
$icon = $this->iconFactory->getIcon('apps-pagetree-root', IconSize::SMALL);
|
||||
}
|
||||
$iconMarkup = '<span title="' . BackendUtility::getRecordIconAltText($this->pageInfo, 'pages') . '">' . $icon->render() . '</span>';
|
||||
$tree->tree[] = ['row' => $this->pageInfo, 'HTML' => '', 'icon' => $iconMarkup];
|
||||
$tree->getTree($this->id, $this->depth);
|
||||
|
||||
return $tree->tree;
|
||||
}
|
||||
|
||||
protected function getDepthOptions(): array
|
||||
{
|
||||
$depthOptions = [];
|
||||
foreach (self::DEPTH_LEVELS as $depthLevel) {
|
||||
$levelLabel = $depthLevel === 1 ? 'level' : 'levels';
|
||||
$depthOptions[$depthLevel] = $depthLevel . ' ' . $this->getLanguageService()->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:' . $levelLabel);
|
||||
}
|
||||
return $depthOptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finding tree and offer setting of values recursively.
|
||||
*/
|
||||
protected function getRecursiveSelectOptions(): array
|
||||
{
|
||||
$lang = $this->getLanguageService();
|
||||
// Initialize tree object:
|
||||
$tree = GeneralUtility::makeInstance(PageTreeView::class);
|
||||
$tree->init();
|
||||
$tree->makeHTML = false;
|
||||
// Make tree:
|
||||
$tree->getTree($this->id, self::RECURSIVE_LEVELS);
|
||||
$options = [
|
||||
'' => $lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:selectNone'),
|
||||
];
|
||||
// If there are a hierarchy of page ids, then...
|
||||
if (!empty($tree->orig_ids_hierarchy) && ($this->getBackendUser()->user['uid'] ?? false)) {
|
||||
// Init:
|
||||
$labelRecursive = $lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:recursive');
|
||||
$labelLevel = $lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:level');
|
||||
$labelLevels = $lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:levels');
|
||||
$labelPageAffected = $lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:page_affected');
|
||||
$labelPagesAffected = $lang->sL('LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:pages_affected');
|
||||
$theIdListArr = [];
|
||||
// Traverse the number of levels we want to allow recursive
|
||||
// setting of permissions for:
|
||||
for ($a = self::RECURSIVE_LEVELS; $a > 0; $a--) {
|
||||
if (is_array($tree->orig_ids_hierarchy[$a] ?? false)) {
|
||||
foreach ($tree->orig_ids_hierarchy[$a] as $theId) {
|
||||
$theIdListArr[] = $theId;
|
||||
}
|
||||
$lKey = self::RECURSIVE_LEVELS - $a + 1;
|
||||
$pagesCount = count($theIdListArr);
|
||||
$options[implode(',', $theIdListArr)] = $labelRecursive . ' ' . $lKey . ' ' . ($lKey === 1 ? $labelLevel : $labelLevels)
|
||||
. ' (' . $pagesCount . ' ' . ($pagesCount === 1 ? $labelPageAffected : $labelPagesAffected) . ')';
|
||||
}
|
||||
}
|
||||
}
|
||||
return $options;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a flash message to the default flash message queue
|
||||
*/
|
||||
protected function addFlashMessage(string $message, string $title = '', ContextualFeedbackSeverity $severity = ContextualFeedbackSeverity::INFO): void
|
||||
{
|
||||
$flashMessage = new FlashMessage($message, $title, $severity, true);
|
||||
$defaultFlashMessageQueue = $this->flashMessageService->getMessageQueueByIdentifier();
|
||||
$defaultFlashMessageQueue->enqueue($flashMessage);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shortcut title for the current page
|
||||
*/
|
||||
protected function getShortcutTitle(): string
|
||||
{
|
||||
return sprintf(
|
||||
'%s: %s [%d]',
|
||||
$this->getLanguageService()->translate('title', 'beuser.modules.permissions'),
|
||||
BackendUtility::getRecordTitle('pages', $this->pageInfo),
|
||||
$this->id
|
||||
);
|
||||
}
|
||||
|
||||
protected function htmlResponse(string $html, int $code = 200): ResponseInterface
|
||||
{
|
||||
$response = $this->responseFactory->createResponse($code)
|
||||
->withHeader('Content-Type', 'text/html; charset=utf-8');
|
||||
$response->getBody()->write($html);
|
||||
return $response;
|
||||
}
|
||||
|
||||
protected function getBackendUser(): BackendUserAuthentication
|
||||
{
|
||||
return $GLOBALS['BE_USER'];
|
||||
}
|
||||
|
||||
protected function getLanguageService(): LanguageService
|
||||
{
|
||||
return $GLOBALS['LANG'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Dto;
|
||||
|
||||
/**
|
||||
* @internal not part of the TYPO3 Core API.
|
||||
*/
|
||||
class BackendUserGroup
|
||||
{
|
||||
public function __construct(protected string $title = '') {}
|
||||
|
||||
public static function fromUc(array $uc): self
|
||||
{
|
||||
$demand = new self();
|
||||
$demand->title = (string)($uc['title'] ?? '');
|
||||
return $demand;
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function forUc(): array
|
||||
{
|
||||
return [
|
||||
'title' => $this->title,
|
||||
];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,240 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Model;
|
||||
|
||||
use TYPO3\CMS\Backend\Authentication\PasswordReset;
|
||||
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Attribute as Extbase;
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
|
||||
/**
|
||||
* Model for backend user
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
*/
|
||||
class BackendUser extends AbstractEntity
|
||||
{
|
||||
#[Extbase\Validate(validator: 'NotEmpty')]
|
||||
protected string $userName = '';
|
||||
|
||||
/**
|
||||
* @var ObjectStorage<BackendUserGroup>
|
||||
*/
|
||||
protected ObjectStorage $backendUserGroups;
|
||||
|
||||
/**
|
||||
* Comma separated list of uids in multi-select
|
||||
* Might retrieve the labels from TCA/DataMapper
|
||||
*/
|
||||
protected string $allowedLanguages = '';
|
||||
|
||||
protected string $dbMountPoints = '';
|
||||
protected string $description = '';
|
||||
protected string $fileMountPoints = '';
|
||||
protected bool $isAdministrator = false;
|
||||
protected bool $isDisabled = false;
|
||||
protected ?\DateTime $startDateAndTime = null;
|
||||
protected ?\DateTime $endDateAndTime = null;
|
||||
protected string $email = '';
|
||||
protected string $realName = '';
|
||||
protected ?\DateTime $lastLoginDateAndTime = null;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
public function initializeObject(): void
|
||||
{
|
||||
$this->backendUserGroups = new ObjectStorage();
|
||||
}
|
||||
|
||||
public function setAllowedLanguages(string $allowedLanguages): void
|
||||
{
|
||||
$this->allowedLanguages = $allowedLanguages;
|
||||
}
|
||||
|
||||
public function getAllowedLanguages(): string
|
||||
{
|
||||
return $this->allowedLanguages;
|
||||
}
|
||||
|
||||
public function setDbMountPoints(string $dbMountPoints): void
|
||||
{
|
||||
$this->dbMountPoints = $dbMountPoints;
|
||||
}
|
||||
|
||||
public function getDbMountPoints(): string
|
||||
{
|
||||
return $this->dbMountPoints;
|
||||
}
|
||||
|
||||
public function setFileMountPoints(string $fileMountPoints): void
|
||||
{
|
||||
$this->fileMountPoints = $fileMountPoints;
|
||||
}
|
||||
|
||||
public function getFileMountPoints(): string
|
||||
{
|
||||
return $this->fileMountPoints;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user is active, not disabled
|
||||
*/
|
||||
public function isActive(): bool
|
||||
{
|
||||
if ($this->getIsDisabled()) {
|
||||
return false;
|
||||
}
|
||||
$now = new \DateTime('now');
|
||||
return (!$this->getStartDateAndTime() && !$this->getEndDateAndTime()) || ($this->getStartDateAndTime() <= $now && (!$this->getEndDateAndTime() || $this->getEndDateAndTime() > $now));
|
||||
}
|
||||
|
||||
public function setBackendUserGroups(ObjectStorage $backendUserGroups): void
|
||||
{
|
||||
$this->backendUserGroups = $backendUserGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return ObjectStorage<BackendUserGroup>
|
||||
*/
|
||||
public function getBackendUserGroups(): ObjectStorage
|
||||
{
|
||||
return $this->backendUserGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if user is currently logged in
|
||||
*/
|
||||
public function isCurrentlyLoggedIn(): bool
|
||||
{
|
||||
return $this->getUid() === (int)($this->getBackendUser()->user['uid'] ?? 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the user is allowed to trigger a password reset
|
||||
*
|
||||
* Requirements:
|
||||
* 1. The user for which the password reset should be triggered is not the currently logged in user
|
||||
* 2. Password reset is enabled for the user (Email+Password are set)
|
||||
* 3. The currently logged in user is allowed to reset passwords in the backend (Enabled in user TSconfig)
|
||||
*/
|
||||
public function isPasswordResetEnabled(): bool
|
||||
{
|
||||
return !$this->isCurrentlyLoggedIn()
|
||||
&& GeneralUtility::makeInstance(PasswordReset::class)->isEnabledForUser((int)$this->getUid())
|
||||
&& ($this->getBackendUser()->getTSConfig()['options.']['passwordReset'] ?? true);
|
||||
}
|
||||
|
||||
public function getUserName(): string
|
||||
{
|
||||
return $this->userName;
|
||||
}
|
||||
|
||||
public function setUserName(string $userName): void
|
||||
{
|
||||
$this->userName = $userName;
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
public function setDescription(string $description): void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
public function getIsAdministrator(): bool
|
||||
{
|
||||
return $this->isAdministrator;
|
||||
}
|
||||
|
||||
public function setIsAdministrator(bool $isAdministrator): void
|
||||
{
|
||||
$this->isAdministrator = $isAdministrator;
|
||||
}
|
||||
|
||||
public function getIsDisabled(): bool
|
||||
{
|
||||
return $this->isDisabled;
|
||||
}
|
||||
|
||||
public function setIsDisabled(bool $isDisabled): void
|
||||
{
|
||||
$this->isDisabled = $isDisabled;
|
||||
}
|
||||
|
||||
public function getStartDateAndTime(): ?\DateTime
|
||||
{
|
||||
return $this->startDateAndTime;
|
||||
}
|
||||
|
||||
public function setStartDateAndTime(?\DateTime $dateAndTime = null): void
|
||||
{
|
||||
$this->startDateAndTime = $dateAndTime;
|
||||
}
|
||||
|
||||
public function getEndDateAndTime(): ?\DateTime
|
||||
{
|
||||
return $this->endDateAndTime;
|
||||
}
|
||||
|
||||
public function setEndDateAndTime(?\DateTime $dateAndTime = null): void
|
||||
{
|
||||
$this->endDateAndTime = $dateAndTime;
|
||||
}
|
||||
|
||||
public function getEmail(): string
|
||||
{
|
||||
return $this->email;
|
||||
}
|
||||
|
||||
public function setEmail(string $email): void
|
||||
{
|
||||
$this->email = $email;
|
||||
}
|
||||
|
||||
public function getRealName(): string
|
||||
{
|
||||
return $this->realName;
|
||||
}
|
||||
|
||||
public function setRealName(string $name): void
|
||||
{
|
||||
$this->realName = $name;
|
||||
}
|
||||
|
||||
public function getLastLoginDateAndTime(): ?\DateTime
|
||||
{
|
||||
return $this->lastLoginDateAndTime;
|
||||
}
|
||||
|
||||
public function setLastLoginDateAndTime(?\DateTime $dateAndTime = null): void
|
||||
{
|
||||
$this->lastLoginDateAndTime = $dateAndTime;
|
||||
}
|
||||
|
||||
public function getBackendUser(): BackendUserAuthentication
|
||||
{
|
||||
return $GLOBALS['BE_USER'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Model;
|
||||
|
||||
use TYPO3\CMS\Extbase\Attribute as Extbase;
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
use TYPO3\CMS\Extbase\Persistence\ObjectStorage;
|
||||
|
||||
/**
|
||||
* Model for backend user group
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
*/
|
||||
class BackendUserGroup extends AbstractEntity
|
||||
{
|
||||
protected string $title = '';
|
||||
protected string $description = '';
|
||||
protected bool $hidden = false;
|
||||
|
||||
/**
|
||||
* @var ObjectStorage<BackendUserGroup>
|
||||
*/
|
||||
#[Extbase\ORM\Lazy]
|
||||
protected ObjectStorage $subGroups;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->initializeObject();
|
||||
}
|
||||
|
||||
public function initializeObject(): void
|
||||
{
|
||||
$this->subGroups = new ObjectStorage();
|
||||
}
|
||||
|
||||
public function setTitle(string $title): void
|
||||
{
|
||||
$this->title = $title;
|
||||
}
|
||||
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
public function getDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
public function setDescription(string $description): void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
public function setHidden(bool $hidden): void
|
||||
{
|
||||
$this->hidden = $hidden;
|
||||
}
|
||||
|
||||
public function getHidden(): bool
|
||||
{
|
||||
return $this->hidden;
|
||||
}
|
||||
|
||||
public function setSubGroups(ObjectStorage $subGroups): void
|
||||
{
|
||||
$this->subGroups = $subGroups;
|
||||
}
|
||||
|
||||
public function getSubGroups(): ObjectStorage
|
||||
{
|
||||
return $this->subGroups;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Model;
|
||||
|
||||
/**
|
||||
* Demand filter for listings
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
*/
|
||||
class Demand
|
||||
{
|
||||
public const ALL = 0;
|
||||
|
||||
public const USERTYPE_ADMINONLY = 1;
|
||||
public const USERTYPE_USERONLY = 2;
|
||||
|
||||
public const STATUS_ACTIVE = 1;
|
||||
public const STATUS_INACTIVE = 2;
|
||||
|
||||
public const LOGIN_SOME = 1;
|
||||
public const LOGIN_NONE = 2;
|
||||
public const LOGIN_CURRENT = 3;
|
||||
|
||||
protected string $userName = '';
|
||||
protected int $userType = self::ALL;
|
||||
protected int $status = self::ALL;
|
||||
protected int $logins = 0;
|
||||
protected int $backendUserGroup = 0;
|
||||
|
||||
public static function fromUc(array $uc): self
|
||||
{
|
||||
$demand = new self();
|
||||
$demand->userName = (string)($uc['userName'] ?? '');
|
||||
$demand->userType = (int)($uc['userType'] ?? 0);
|
||||
$demand->status = (int)($uc['status'] ?? 0);
|
||||
$demand->logins = (int)($uc['logins'] ?? 0);
|
||||
$demand->backendUserGroup = (int)($uc['backendUserGroup'] ?? 0);
|
||||
return $demand;
|
||||
}
|
||||
|
||||
public function forUc(): array
|
||||
{
|
||||
return [
|
||||
'userName' => $this->getUserName(),
|
||||
'userType' => $this->getUserType(),
|
||||
'status' => $this->getStatus(),
|
||||
'logins' => $this->getLogins(),
|
||||
'backendUserGroup' => $this->getBackendUserGroup(),
|
||||
];
|
||||
}
|
||||
|
||||
public function setUserName(string $userName): void
|
||||
{
|
||||
$this->userName = $userName;
|
||||
}
|
||||
|
||||
public function getUserName(): string
|
||||
{
|
||||
return $this->userName;
|
||||
}
|
||||
|
||||
public function setUserType(int $userType): void
|
||||
{
|
||||
$this->userType = $userType;
|
||||
}
|
||||
|
||||
public function getUserType(): int
|
||||
{
|
||||
return $this->userType;
|
||||
}
|
||||
|
||||
public function setStatus(int $status): void
|
||||
{
|
||||
$this->status = $status;
|
||||
}
|
||||
|
||||
public function getStatus(): int
|
||||
{
|
||||
return $this->status;
|
||||
}
|
||||
|
||||
public function setLogins(int $logins): void
|
||||
{
|
||||
$this->logins = $logins;
|
||||
}
|
||||
|
||||
public function getLogins(): int
|
||||
{
|
||||
return $this->logins;
|
||||
}
|
||||
|
||||
public function setBackendUserGroup(int $backendUserGroup): void
|
||||
{
|
||||
$this->backendUserGroup = $backendUserGroup;
|
||||
}
|
||||
|
||||
public function getBackendUserGroup(): int
|
||||
{
|
||||
return $this->backendUserGroup;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Model;
|
||||
|
||||
use TYPO3\CMS\Core\Resource\ResourceStorage;
|
||||
use TYPO3\CMS\Core\Resource\StorageRepository;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Attribute as Extbase;
|
||||
use TYPO3\CMS\Extbase\DomainObject\AbstractEntity;
|
||||
|
||||
/**
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
*/
|
||||
class FileMount extends AbstractEntity
|
||||
{
|
||||
/**
|
||||
* Title of the file mount.
|
||||
*/
|
||||
#[Extbase\Validate(validator: 'NotEmpty')]
|
||||
protected string $title = '';
|
||||
|
||||
/**
|
||||
* Description of the file mount.
|
||||
*/
|
||||
protected string $description = '';
|
||||
|
||||
/**
|
||||
* Identifier of the file mount
|
||||
*/
|
||||
protected string $identifier = '';
|
||||
|
||||
/**
|
||||
* Status of the file mount
|
||||
*/
|
||||
protected bool $hidden = false;
|
||||
|
||||
/**
|
||||
* Determines whether this file mount should be read only.
|
||||
*/
|
||||
protected bool $readOnly = false;
|
||||
|
||||
/**
|
||||
* Getter for the title of the file mount.
|
||||
*/
|
||||
public function getTitle(): string
|
||||
{
|
||||
return $this->title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for the title of the file mount.
|
||||
*/
|
||||
public function setTitle(string $value): void
|
||||
{
|
||||
$this->title = $value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for the description of the file mount.
|
||||
*/
|
||||
public function getDescription(): string
|
||||
{
|
||||
return $this->description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for the description of the file mount.
|
||||
*/
|
||||
public function setDescription(string $description): void
|
||||
{
|
||||
$this->description = $description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter for the readOnly property of the file mount.
|
||||
*/
|
||||
public function setReadOnly(bool $readOnly): void
|
||||
{
|
||||
$this->readOnly = $readOnly;
|
||||
}
|
||||
|
||||
/**
|
||||
* Getter for the readOnly property of the file mount.
|
||||
*/
|
||||
public function isReadOnly(): bool
|
||||
{
|
||||
return $this->readOnly;
|
||||
}
|
||||
|
||||
public function getIdentifier(): string
|
||||
{
|
||||
return $this->identifier;
|
||||
}
|
||||
|
||||
public function setIdentifier(string $identifier): void
|
||||
{
|
||||
$this->identifier = $identifier;
|
||||
}
|
||||
|
||||
public function isHidden(): bool
|
||||
{
|
||||
return $this->hidden;
|
||||
}
|
||||
|
||||
public function setHidden(bool $hidden): void
|
||||
{
|
||||
$this->hidden = $hidden;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns the path segment of the file mount (without the storage id)
|
||||
*/
|
||||
public function getPath(): string
|
||||
{
|
||||
return explode(':/', $this->identifier)[1] ?? '';
|
||||
}
|
||||
|
||||
/**
|
||||
* @todo This should be part of the ORM not the model class
|
||||
*/
|
||||
public function getStorage(): ?ResourceStorage
|
||||
{
|
||||
return GeneralUtility::makeInstance(StorageRepository::class)->findByCombinedIdentifier($this->identifier);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Beuser\Domain\Dto\BackendUserGroup;
|
||||
use TYPO3\CMS\Beuser\Event\AfterBackendGroupListConstraintsAssembledFromDemandEvent;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Database\Query\QueryBuilder;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
use TYPO3\CMS\Extbase\Persistence\Exception\InvalidQueryException;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\QueryResult;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
|
||||
/**
|
||||
* Repository for \TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
* @extends Repository<\TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup>
|
||||
*/
|
||||
class BackendUserGroupRepository extends Repository
|
||||
{
|
||||
public const TABLE_NAME = 'be_groups';
|
||||
|
||||
protected $defaultOrderings = [
|
||||
'title' => QueryInterface::ORDER_ASCENDING,
|
||||
];
|
||||
|
||||
/**
|
||||
* Overwrite createQuery to don't respect enable fields
|
||||
*/
|
||||
public function createQuery(): QueryInterface
|
||||
{
|
||||
$query = parent::createQuery();
|
||||
$query->getQuerySettings()->setIgnoreEnableFields(true);
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get QueryBuilder without restrictions for table be_groups
|
||||
*/
|
||||
public function getQueryBuilder(bool $removeRestrictions = true): QueryBuilder
|
||||
{
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable(self::TABLE_NAME);
|
||||
if ($removeRestrictions === true) {
|
||||
$queryBuilder->getRestrictions()->removeAll();
|
||||
}
|
||||
|
||||
return $queryBuilder;
|
||||
}
|
||||
|
||||
/**
|
||||
* Finds Backend Usergroups on a given list of uids
|
||||
*/
|
||||
public function findByUidList(array $uidList): array
|
||||
{
|
||||
$query = $this->createQuery();
|
||||
// being explicit here, albeit `Typo3DbQueryParser::parseDynamicOperand` uses prepared parameters
|
||||
$uidList = array_map(intval(...), $uidList);
|
||||
$query->matching($query->in('uid', $uidList));
|
||||
return $query->execute(true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Preforms a query on be_groups, matching the field title with like
|
||||
* @throws InvalidQueryException
|
||||
*/
|
||||
public function findByFilter(BackendUserGroup $backendUserGroupDto): QueryResult
|
||||
{
|
||||
$constraints = [];
|
||||
$query = $this->createQuery();
|
||||
$query->setOrderings(['title' => QueryInterface::ORDER_ASCENDING]);
|
||||
if ($backendUserGroupDto->getTitle() !== '') {
|
||||
$searchConstraints = [];
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable(self::TABLE_NAME);
|
||||
$searchConstraints[] = $query->like(
|
||||
'title',
|
||||
'%' . $queryBuilder->escapeLikeWildcards($backendUserGroupDto->getTitle()) . '%'
|
||||
);
|
||||
|
||||
if (MathUtility::canBeInterpretedAsInteger($backendUserGroupDto->getTitle())) {
|
||||
$searchConstraints[] = $query->equals('uid', (int)$backendUserGroupDto->getTitle());
|
||||
}
|
||||
|
||||
if (count($searchConstraints) >= 2) {
|
||||
$constraints[] = $query->logicalOr(...$searchConstraints);
|
||||
} else {
|
||||
$constraints = $searchConstraints;
|
||||
}
|
||||
}
|
||||
$constraints = $this->eventDispatcher->dispatch(
|
||||
new AfterBackendGroupListConstraintsAssembledFromDemandEvent(
|
||||
$backendUserGroupDto,
|
||||
$query,
|
||||
$constraints
|
||||
)
|
||||
)->constraints;
|
||||
$query->matching($query->logicalAnd(...$constraints));
|
||||
/** @var QueryResult $result */
|
||||
$result = $query->execute();
|
||||
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,171 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Beuser\Domain\Model\BackendUser;
|
||||
use TYPO3\CMS\Beuser\Domain\Model\Demand;
|
||||
use TYPO3\CMS\Beuser\Event\AfterBackendUserListConstraintsAssembledFromDemandEvent;
|
||||
use TYPO3\CMS\Core\Database\ConnectionPool;
|
||||
use TYPO3\CMS\Core\Session\Backend\SessionBackendInterface;
|
||||
use TYPO3\CMS\Core\Session\SessionManager;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Core\Utility\MathUtility;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\QueryResult;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
|
||||
/**
|
||||
* Repository for \TYPO3\CMS\Beuser\Domain\Model\BackendUser
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
* @extends Repository<BackendUser>
|
||||
*/
|
||||
class BackendUserRepository extends Repository
|
||||
{
|
||||
/**
|
||||
* Finds Backend Users on a given list of uids
|
||||
*/
|
||||
public function findByUidList(array $uidList): QueryResult
|
||||
{
|
||||
$query = $this->createQuery();
|
||||
$query->matching($query->in('uid', array_map(intval(...), $uidList)));
|
||||
/** @var QueryResult $result */
|
||||
$result = $query->execute();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Backend Users matching to Demand object properties
|
||||
*/
|
||||
public function findDemanded(Demand $demand): QueryResult
|
||||
{
|
||||
$constraints = [];
|
||||
$query = $this->createQuery();
|
||||
$query->setOrderings(['userName' => QueryInterface::ORDER_ASCENDING]);
|
||||
// Username
|
||||
if ($demand->getUserName() !== '') {
|
||||
$searchConstraints = [];
|
||||
$queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable('be_users');
|
||||
foreach (['userName', 'realName'] as $field) {
|
||||
$searchConstraints[] = $query->like(
|
||||
$field,
|
||||
'%' . $queryBuilder->escapeLikeWildcards($demand->getUserName()) . '%'
|
||||
);
|
||||
}
|
||||
if (MathUtility::canBeInterpretedAsInteger($demand->getUserName())) {
|
||||
$searchConstraints[] = $query->equals('uid', (int)$demand->getUserName());
|
||||
}
|
||||
if (count($searchConstraints) === 1) {
|
||||
$constraints[] = reset($searchConstraints);
|
||||
} else {
|
||||
$constraints[] = $query->logicalOr(...$searchConstraints);
|
||||
}
|
||||
}
|
||||
|
||||
switch ($demand->getUserType()) {
|
||||
case Demand::USERTYPE_ADMINONLY:
|
||||
// Only display admin users
|
||||
$constraints[] = $query->equals('admin', 1);
|
||||
break;
|
||||
case Demand::USERTYPE_USERONLY:
|
||||
// Only display non-admin users
|
||||
$constraints[] = $query->equals('admin', 0);
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($demand->getStatus()) {
|
||||
case Demand::STATUS_ACTIVE:
|
||||
// Only display active users
|
||||
$constraints[] = $query->equals('disable', 0);
|
||||
break;
|
||||
case Demand::STATUS_INACTIVE:
|
||||
// Only display in-active users
|
||||
$constraints[] = $query->equals('disable', 1);
|
||||
break;
|
||||
}
|
||||
|
||||
switch ($demand->getLogins()) {
|
||||
case Demand::LOGIN_NONE:
|
||||
// Not logged in before
|
||||
$constraints[] = $query->equals('lastlogin', 0);
|
||||
break;
|
||||
case Demand::LOGIN_SOME:
|
||||
// At least one login
|
||||
$constraints[] = $query->logicalNot($query->equals('lastlogin', 0));
|
||||
break;
|
||||
|
||||
case Demand::LOGIN_CURRENT:
|
||||
// Currently logged-in users
|
||||
$sessionTimeout = (int)($GLOBALS['TYPO3_CONF_VARS']['BE']['sessionTimeout'] ?? 28800);
|
||||
$constraints[] = $query->greaterThanOrEqual('lastlogin', time() - $sessionTimeout);
|
||||
}
|
||||
|
||||
// In backend user group
|
||||
if ($demand->getBackendUserGroup()) {
|
||||
$constraints[] = $query->logicalOr(
|
||||
$query->equals('usergroup', $demand->getBackendUserGroup()),
|
||||
$query->like('usergroup', $demand->getBackendUserGroup() . ',%'),
|
||||
$query->like('usergroup', '%,' . $demand->getBackendUserGroup()),
|
||||
$query->like('usergroup', '%,' . $demand->getBackendUserGroup() . ',%'),
|
||||
);
|
||||
}
|
||||
$constraints = $this->eventDispatcher->dispatch(
|
||||
new AfterBackendUserListConstraintsAssembledFromDemandEvent(
|
||||
$demand,
|
||||
$query,
|
||||
$constraints
|
||||
)
|
||||
)->constraints;
|
||||
$query->matching($query->logicalAnd(...$constraints));
|
||||
|
||||
/** @var QueryResult $result */
|
||||
$result = $query->execute();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Backend Users currently online
|
||||
*/
|
||||
public function findOnline(): QueryResult
|
||||
{
|
||||
$uids = [];
|
||||
foreach ($this->getSessionBackend()->getAll() as $sessionRecord) {
|
||||
if (isset($sessionRecord['ses_userid']) && !in_array($sessionRecord['ses_userid'], $uids, true)) {
|
||||
$uids[] = $sessionRecord['ses_userid'];
|
||||
}
|
||||
}
|
||||
|
||||
$query = $this->createQuery();
|
||||
$query->matching($query->in('uid', $uids));
|
||||
/** @var QueryResult $result */
|
||||
$result = $query->execute();
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Overwrite createQuery to don't respect enable fields
|
||||
*/
|
||||
public function createQuery(): QueryInterface
|
||||
{
|
||||
$query = parent::createQuery();
|
||||
$query->getQuerySettings()->setIgnoreEnableFields(true);
|
||||
return $query;
|
||||
}
|
||||
|
||||
protected function getSessionBackend(): SessionBackendInterface
|
||||
{
|
||||
return GeneralUtility::makeInstance(SessionManager::class)->getSessionBackend('BE');
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,93 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Beuser\Domain\Model\BackendUser;
|
||||
use TYPO3\CMS\Core\Authentication\AbstractUserAuthentication;
|
||||
use TYPO3\CMS\Core\Session\Backend\HashableSessionBackendInterface;
|
||||
use TYPO3\CMS\Core\Session\Backend\SessionBackendInterface;
|
||||
use TYPO3\CMS\Core\Session\SessionManager;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* @internal This class is a TYPO3 Backend implementation and is not considered part of the Public TYPO3 API.
|
||||
*/
|
||||
class BackendUserSessionRepository
|
||||
{
|
||||
protected SessionBackendInterface $sessionBackend;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->sessionBackend = GeneralUtility::makeInstance(SessionManager::class)->getSessionBackend('BE');
|
||||
}
|
||||
|
||||
/**
|
||||
* Find all active sessions for all backend users
|
||||
*/
|
||||
public function findAllActive(): array
|
||||
{
|
||||
$allSessions = $this->sessionBackend->getAll();
|
||||
|
||||
// Map array to correct keys
|
||||
$allSessions = array_map(
|
||||
static function (array $session): array {
|
||||
return [
|
||||
'id' => $session['ses_id'], // this is the hashed sessionId
|
||||
'ip' => $session['ses_iplock'],
|
||||
'timestamp' => $session['ses_tstamp'],
|
||||
'ses_userid' => $session['ses_userid'],
|
||||
];
|
||||
},
|
||||
$allSessions
|
||||
);
|
||||
|
||||
// Sort by timestamp
|
||||
usort($allSessions, static function ($session1, $session2) {
|
||||
return $session1['timestamp'] <=> $session2['timestamp'];
|
||||
});
|
||||
|
||||
return $allSessions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Find Sessions for specific BackendUser
|
||||
*/
|
||||
public function findByBackendUser(BackendUser $backendUser): array
|
||||
{
|
||||
$allActive = $this->findAllActive();
|
||||
|
||||
return array_filter(
|
||||
$allActive,
|
||||
static function (array $session) use ($backendUser): bool {
|
||||
return (int)$session['ses_userid'] === $backendUser->getUid();
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
public function getPersistedSessionIdentifier(AbstractUserAuthentication $userObject): string
|
||||
{
|
||||
$currentSessionId = $userObject->getSession()->getIdentifier();
|
||||
if ($this->sessionBackend instanceof HashableSessionBackendInterface) {
|
||||
$currentSessionId = $this->sessionBackend->hash($currentSessionId);
|
||||
}
|
||||
return $currentSessionId;
|
||||
}
|
||||
|
||||
public function terminateSessionByIdentifier(string $sessionIdentifier): bool
|
||||
{
|
||||
return $this->sessionBackend->remove($sessionIdentifier);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Domain\Repository;
|
||||
|
||||
use TYPO3\CMS\Beuser\Domain\Model\FileMount;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3\CMS\Extbase\Persistence\Generic\Typo3QuerySettings;
|
||||
use TYPO3\CMS\Extbase\Persistence\Repository;
|
||||
|
||||
/**
|
||||
* Repository for \TYPO3\CMS\Extbase\Domain\Model\FileMount.
|
||||
* @extends Repository<FileMount>
|
||||
*/
|
||||
class FileMountRepository extends Repository
|
||||
{
|
||||
public function initializeObject(): void
|
||||
{
|
||||
/** @var Typo3QuerySettings $querySettings */
|
||||
$querySettings = GeneralUtility::makeInstance(Typo3QuerySettings::class);
|
||||
$querySettings->setRespectStoragePage(false);
|
||||
$querySettings->setIgnoreEnableFields(true);
|
||||
$this->setDefaultQuerySettings($querySettings);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Event;
|
||||
|
||||
use TYPO3\CMS\Extbase\Mvc\RequestInterface;
|
||||
|
||||
/**
|
||||
* Listeners are able to manipulating the backend groups list, used for the filter selector in the backend module
|
||||
*/
|
||||
final class AfterBackendGroupFilterListIsAssembledEvent
|
||||
{
|
||||
public function __construct(
|
||||
public readonly RequestInterface $request,
|
||||
public array $backendGroups
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Event;
|
||||
|
||||
use TYPO3\CMS\Beuser\Domain\Dto\BackendUserGroup;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
|
||||
/**
|
||||
* Listeners are able to manipulating the constraint, used to find demanded user groups for the backend module
|
||||
*/
|
||||
final class AfterBackendGroupListConstraintsAssembledFromDemandEvent
|
||||
{
|
||||
public function __construct(
|
||||
public readonly BackendUserGroup $backendUserGroupDto,
|
||||
public readonly QueryInterface $query,
|
||||
public array $constraints
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Event;
|
||||
|
||||
use TYPO3\CMS\Beuser\Domain\Model\Demand;
|
||||
use TYPO3\CMS\Extbase\Persistence\QueryInterface;
|
||||
|
||||
/**
|
||||
* Listeners are able to manipulating the constraint, used to find demanded users for the backend module
|
||||
*/
|
||||
final class AfterBackendUserListConstraintsAssembledFromDemandEvent
|
||||
{
|
||||
public function __construct(
|
||||
public readonly Demand $demand,
|
||||
public readonly QueryInterface $query,
|
||||
public array $constraints
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Event;
|
||||
|
||||
use TYPO3\CMS\Extbase\Mvc\RequestInterface;
|
||||
|
||||
/**
|
||||
* Listeners are able to manipulating the list of file mounts shown in the backend module
|
||||
*/
|
||||
final class AfterFilemountsListIsAssembledEvent
|
||||
{
|
||||
public function __construct(
|
||||
public readonly RequestInterface $request,
|
||||
public array $filemounts,
|
||||
) {}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser;
|
||||
|
||||
use TYPO3\CMS\Core\Exception as CoreException;
|
||||
|
||||
/**
|
||||
* Generic Beuser exception
|
||||
* @internal
|
||||
*/
|
||||
class Exception extends CoreException {}
|
||||
@@ -0,0 +1,293 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\Service;
|
||||
|
||||
use TYPO3\CMS\Backend\Module\ModuleProvider;
|
||||
use TYPO3\CMS\Backend\Utility\BackendUtility;
|
||||
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
|
||||
use TYPO3\CMS\Core\DataHandling\PageDoktypeRegistry;
|
||||
use TYPO3\CMS\Core\Imaging\Icon;
|
||||
use TYPO3\CMS\Core\Imaging\IconFactory;
|
||||
use TYPO3\CMS\Core\Imaging\IconSize;
|
||||
use TYPO3\CMS\Core\Schema\Field\StaticSelectFieldType;
|
||||
use TYPO3\CMS\Core\Schema\SchemaLabelResolver;
|
||||
use TYPO3\CMS\Core\Schema\TcaSchemaFactory;
|
||||
use TYPO3\CMS\Core\Site\SiteFinder;
|
||||
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
|
||||
/**
|
||||
* Transform information of user and groups into better format
|
||||
* @internal
|
||||
*/
|
||||
final readonly class UserInformationService
|
||||
{
|
||||
public function __construct(
|
||||
private IconFactory $iconFactory,
|
||||
private ModuleProvider $moduleProvider,
|
||||
private TcaSchemaFactory $tcaSchemaFactory,
|
||||
private PageDoktypeRegistry $pageDoktypeRegistry,
|
||||
private SchemaLabelResolver $schemaLabelResolver,
|
||||
private SiteFinder $siteFinder,
|
||||
) {}
|
||||
|
||||
/**
|
||||
* Get all relevant information for a backend usergroup
|
||||
*/
|
||||
public function getGroupInformation(int $groupId): array
|
||||
{
|
||||
$usergroupRecord = BackendUtility::getRecord('be_groups', $groupId);
|
||||
if (!$usergroupRecord) {
|
||||
return [];
|
||||
}
|
||||
|
||||
$user = GeneralUtility::makeInstance(BackendUserAuthentication::class);
|
||||
$user->enablecolumns = [
|
||||
'deleted' => true,
|
||||
];
|
||||
|
||||
// Setup dummy user to allow fetching all group data
|
||||
// @see \TYPO3\CMS\Core\Authentication\BackendUserAuthentication::fetchGroups
|
||||
$user->user = [
|
||||
'uid' => PHP_INT_MAX,
|
||||
'options' => 3,
|
||||
// The below admin flag is required to prevent workspace access checks,
|
||||
// triggered by workspaceInit() in fetchGroupData(). Those would fail
|
||||
// due to insufficient permissions of the dummy user and therefore might
|
||||
// result in generating superfluous log entries.
|
||||
'admin' => 1,
|
||||
'workspace_id' => 0,
|
||||
'realName' => 'fakeUser',
|
||||
'email' => 'fake.user@typo3.org',
|
||||
'TSconfig' => '',
|
||||
'category_perms' => '',
|
||||
$user->usergroup_column => $groupId,
|
||||
];
|
||||
$user->fetchGroupData();
|
||||
|
||||
$data = $this->convert($user);
|
||||
$data['group'] = $usergroupRecord;
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all relevant information of the user
|
||||
*/
|
||||
public function getUserInformation(int $userId): array
|
||||
{
|
||||
$user = GeneralUtility::makeInstance(BackendUserAuthentication::class);
|
||||
$user->enablecolumns = [
|
||||
'deleted' => true,
|
||||
];
|
||||
$user->setBeUserByUid($userId);
|
||||
if (!$user->user) {
|
||||
return [];
|
||||
}
|
||||
$user->fetchGroupData();
|
||||
|
||||
return $this->convert($user);
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert hard readable user & group information into structured
|
||||
* data which can be rendered later
|
||||
*/
|
||||
private function convert(BackendUserAuthentication $user): array
|
||||
{
|
||||
// usergroups
|
||||
$data = [
|
||||
'user' => $user->user ?? [],
|
||||
'groups' => [
|
||||
'inherit' => $user->userGroupsUID,
|
||||
'direct' => GeneralUtility::trimExplode(',', (string)($user->user['usergroup'] ?? ''), true),
|
||||
],
|
||||
'modules' => [],
|
||||
];
|
||||
$data['groups']['diff'] = array_diff($data['groups']['inherit'], $data['groups']['direct']);
|
||||
foreach ($data['groups'] as $type => $groups) {
|
||||
foreach ($groups as $id) {
|
||||
$record = BackendUtility::getRecord('be_groups', (int)$id);
|
||||
if (isset($record['uid'])) {
|
||||
$recordId = $record['uid'];
|
||||
$data['groups']['all'][$recordId]['row'] = $record;
|
||||
$data['groups']['all'][$recordId][$type] = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// languages
|
||||
$siteLanguages = $this->getAllSiteLanguages();
|
||||
$userLanguages = GeneralUtility::trimExplode(',', $user->groupData['allowed_languages'] ?? '', true);
|
||||
asort($userLanguages);
|
||||
foreach ($userLanguages as $languageId) {
|
||||
$languageId = (int)$languageId;
|
||||
$record = $siteLanguages[$languageId] ?? null;
|
||||
if ($record) {
|
||||
$data['languages'][$languageId] = $record;
|
||||
}
|
||||
}
|
||||
|
||||
// table permissions
|
||||
$data['tables']['tables_select'] = [];
|
||||
$data['tables']['tables_modify'] = [];
|
||||
foreach (['tables_select', 'tables_modify'] as $tableField) {
|
||||
$temp = GeneralUtility::trimExplode(',', $user->groupData[$tableField] ?? '', true);
|
||||
foreach ($temp as $tableName) {
|
||||
if ($this->tcaSchemaFactory->has($tableName)) {
|
||||
$data['tables'][$tableField][$tableName] = $this->tcaSchemaFactory->get($tableName)->getTitle() ?: $tableName;
|
||||
}
|
||||
}
|
||||
}
|
||||
$data['tables']['all'] = array_replace($data['tables']['tables_select'], $data['tables']['tables_modify']);
|
||||
|
||||
// Page Tree Entry Points / dbMounts
|
||||
$dbMounts = GeneralUtility::trimExplode(',', $user->groupData['webmounts'] ?? '', true);
|
||||
asort($dbMounts);
|
||||
foreach ($dbMounts as $mount) {
|
||||
$record = BackendUtility::getRecord('pages', (int)$mount);
|
||||
if ($record) {
|
||||
$data['dbMounts'][] = $record;
|
||||
}
|
||||
}
|
||||
|
||||
// File mounts
|
||||
$fileMounts = GeneralUtility::trimExplode(',', $user->groupData['filemounts'] ?? '', true);
|
||||
asort($fileMounts);
|
||||
foreach ($fileMounts as $mount) {
|
||||
$record = BackendUtility::getRecord('sys_filemounts', (int)$mount);
|
||||
if ($record) {
|
||||
$data['fileMounts'][] = $record;
|
||||
}
|
||||
}
|
||||
|
||||
// Modules
|
||||
$modules = GeneralUtility::trimExplode(',', $user->groupData['modules'] ?? '', true);
|
||||
foreach ($modules as $moduleIdentifier) {
|
||||
if ($this->moduleProvider->isModuleRegistered($moduleIdentifier)) {
|
||||
$data['modules'][] = $this->moduleProvider->getModule($moduleIdentifier);
|
||||
}
|
||||
}
|
||||
|
||||
// Categories
|
||||
$categories = $user->getCategoryMountPoints();
|
||||
foreach ($categories as $category) {
|
||||
$record = BackendUtility::getRecord('sys_category', $category);
|
||||
if ($record) {
|
||||
$data['categories'][$category] = $record;
|
||||
}
|
||||
}
|
||||
|
||||
// workspaces
|
||||
if (ExtensionManagementUtility::isLoaded('workspaces')) {
|
||||
$data['workspaces'] = [
|
||||
'loaded' => true,
|
||||
'record' => $user->workspaceRec,
|
||||
];
|
||||
}
|
||||
|
||||
// file & folder permissions
|
||||
$filePermissions = $user->groupData['file_permissions'] ?? '';
|
||||
if ($filePermissions) {
|
||||
$items = GeneralUtility::trimExplode(',', $filePermissions, true);
|
||||
/** @var StaticSelectFieldType $fieldType */
|
||||
$fieldType = $this->tcaSchemaFactory->get('be_groups')->getField('file_permissions');
|
||||
foreach ($fieldType->getConfiguration()['items'] ?? [] as $availableItem) {
|
||||
if (in_array($availableItem['value'], $items, true)) {
|
||||
$data['fileFolderPermissions'][] = $availableItem;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// tsconfig
|
||||
$data['tsconfig'] = $user->getTSConfig();
|
||||
|
||||
// non_exclude_fields
|
||||
$fieldListTmp = GeneralUtility::trimExplode(',', $user->groupData['non_exclude_fields'] ?? '', true);
|
||||
$fieldList = [];
|
||||
foreach ($fieldListTmp as $item) {
|
||||
$itemParts = explode(':', $item);
|
||||
$itemTable = $itemParts[0];
|
||||
$itemField = $itemParts[1] ?? '';
|
||||
if (!empty($itemField) && $this->tcaSchemaFactory->has($itemTable)) {
|
||||
$schema = $this->tcaSchemaFactory->get($itemTable);
|
||||
$fieldList[$itemTable]['label'] = $schema->getTitle();
|
||||
if ($schema->hasField($itemField)) {
|
||||
$fieldList[$itemTable]['fields'][$itemField] = $schema->getField($itemField)->getLabel();
|
||||
}
|
||||
}
|
||||
}
|
||||
$data['non_exclude_fields'] = $fieldList;
|
||||
|
||||
// page types
|
||||
foreach ($this->pageDoktypeRegistry->getAllDoktypes() as $specialItem) {
|
||||
if (!GeneralUtility::inList($user->groupData['pagetypes_select'] ?? '', $specialItem->getValue())) {
|
||||
continue;
|
||||
}
|
||||
$label = $specialItem->getLabel();
|
||||
$icon = $specialItem->getIcon() ?? 'apps-pagetree-page-default';
|
||||
$data['pageTypes'][] = ['label' => $label, 'value' => $specialItem->getValue(), 'icon' => $icon];
|
||||
}
|
||||
|
||||
// page content types
|
||||
$pageContentTypes = GeneralUtility::trimExplode(',', $user->groupData['explicit_allowdeny'] ?? '', true);
|
||||
foreach ($pageContentTypes as $item) {
|
||||
$split = explode(':', $item);
|
||||
if (count($split) !== 3) {
|
||||
continue;
|
||||
}
|
||||
[$table, $recordType, $recordTypeValue] = $split;
|
||||
$label = $this->schemaLabelResolver->getLabelForFieldValue(...$split);
|
||||
$data['pageContentTypes'][] = [
|
||||
// If label is empty => the record type value does not exist so we use "empty-empty" as icon instead of falling back to the default record type icon
|
||||
'icon' => $label ? $this->iconFactory->getIconForRecord($table, [$recordType => $recordTypeValue], IconSize::SMALL)->getIdentifier() : 'install-check-extables',
|
||||
'label' => $label,
|
||||
'shortType' => $recordTypeValue,
|
||||
'longType' => $item,
|
||||
];
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
private function getAllSiteLanguages(): array
|
||||
{
|
||||
$siteLanguages = [];
|
||||
foreach ($this->siteFinder->getAllSites() as $site) {
|
||||
foreach ($site->getAllLanguages() as $languageId => $language) {
|
||||
if (isset($siteLanguages[$languageId])) {
|
||||
// Language already provided by another site, check if values differ
|
||||
if (!str_contains($siteLanguages[$languageId]['title'], $language->getTitle())) {
|
||||
// Language already provided by another site, but with a different title
|
||||
$siteLanguages[$languageId]['title'] .= ', ' . $language->getTitle();
|
||||
}
|
||||
if ($siteLanguages[$languageId]['flagIconIdentifier'] !== $language->getFlagIdentifier()) {
|
||||
// Language already provided by another site, but with a different flag icon identifier
|
||||
$siteLanguages[$languageId]['flagIconIdentifier'] = 'flags-multiple';
|
||||
}
|
||||
} else {
|
||||
$siteLanguages[$languageId] = [
|
||||
'title' => $language->getTitle(),
|
||||
'flagIconIdentifier' => $language->getFlagIdentifier(),
|
||||
];
|
||||
}
|
||||
}
|
||||
}
|
||||
return $siteLanguages;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\ViewHelpers;
|
||||
|
||||
use TYPO3\CMS\Beuser\Exception;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
|
||||
/**
|
||||
* ViewHelper to get a value from an array by given key.
|
||||
*
|
||||
* ```
|
||||
* <f:render
|
||||
* partial="Permission/Ownername"
|
||||
* arguments="{
|
||||
* username: '{beuser:arrayElement(array:beUsers, key:data.row.perms_userid, subKey:\'username\')}'
|
||||
* }"
|
||||
* />
|
||||
* ```
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class ArrayElementViewHelper extends AbstractViewHelper
|
||||
{
|
||||
public function initializeArguments(): void
|
||||
{
|
||||
$this->registerArgument('array', 'array', 'Array to search in', true);
|
||||
$this->registerArgument('key', 'string', 'Key to return its value', true);
|
||||
$this->registerArgument('subKey', 'string', 'If result of key access is an array, subkey can be used to fetch an element from this again', false, '');
|
||||
}
|
||||
|
||||
/**
|
||||
* Return array element by key. Accessed values must be scalar (string, int, float or double)
|
||||
*
|
||||
* @throws Exception
|
||||
*/
|
||||
public function render(): string
|
||||
{
|
||||
$array = $this->arguments['array'];
|
||||
$key = $this->arguments['key'];
|
||||
$subKey = $this->arguments['subKey'];
|
||||
$result = '';
|
||||
if (isset($array[$key])) {
|
||||
$result = $array[$key];
|
||||
if (is_array($result) && $subKey && isset($result[$subKey])) {
|
||||
$result = $result[$subKey];
|
||||
}
|
||||
}
|
||||
if (!is_scalar($result)) {
|
||||
throw new Exception('Only scalar return values (string, int, float or double) are supported.', 1382284105);
|
||||
}
|
||||
return (string)$result;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\ViewHelpers;
|
||||
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
|
||||
/**
|
||||
* ViewHelper to checks whether the given value is an array.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class IsArrayViewHelper extends AbstractViewHelper
|
||||
{
|
||||
public function initializeArguments(): void
|
||||
{
|
||||
$this->registerArgument('value', 'mixed', 'The variable being checked', true);
|
||||
}
|
||||
|
||||
public function render(): bool
|
||||
{
|
||||
return is_array($this->arguments['value']);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\ViewHelpers;
|
||||
|
||||
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
|
||||
use TYPO3\CMS\Core\Authentication\Mfa\MfaProviderRegistry;
|
||||
use TYPO3\CMS\Core\Localization\LanguageService;
|
||||
use TYPO3\CMS\Core\Utility\GeneralUtility;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
|
||||
|
||||
/**
|
||||
* ViewHelper to render MFA status information.
|
||||
*
|
||||
* ```
|
||||
* <beuser:mfaStatus userUid="{backendUser.uid}" />
|
||||
* ```
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class MfaStatusViewHelper extends AbstractTagBasedViewHelper
|
||||
{
|
||||
protected $tagName = 'span';
|
||||
|
||||
public function __construct(
|
||||
private readonly MfaProviderRegistry $mfaProviderRegistry
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initializeArguments(): void
|
||||
{
|
||||
parent::initializeArguments();
|
||||
$this->registerArgument('userUid', 'int', 'The uid of the user to check', true);
|
||||
}
|
||||
|
||||
public function render(): string
|
||||
{
|
||||
$userUid = (int)($this->arguments['userUid'] ?? 0);
|
||||
if (!$userUid) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$backendUser = GeneralUtility::makeInstance(BackendUserAuthentication::class);
|
||||
$backendUser->enablecolumns = ['deleted' => true];
|
||||
$backendUser->setBeUserByUid($userUid);
|
||||
|
||||
// Check if user has active providers
|
||||
if (!$this->mfaProviderRegistry->hasActiveProviders($backendUser)) {
|
||||
return '';
|
||||
}
|
||||
|
||||
// Check locked providers
|
||||
if ($this->mfaProviderRegistry->hasLockedProviders($backendUser)) {
|
||||
$this->tag->addAttribute('class', 'badge badge-warning');
|
||||
$this->tag->setContent(htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:lockedMfaProviders')));
|
||||
return $this->tag->render();
|
||||
}
|
||||
|
||||
// Add mfa enabled label since we have active providers and non of them are locked
|
||||
$this->tag->addAttribute('class', 'badge badge-info');
|
||||
$this->tag->setContent(htmlspecialchars($this->getLanguageService()->sL('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:mfaEnabled')));
|
||||
return $this->tag->render();
|
||||
}
|
||||
|
||||
private function getLanguageService(): LanguageService
|
||||
{
|
||||
return $GLOBALS['LANG'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,107 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\ViewHelpers;
|
||||
|
||||
use Symfony\Component\DependencyInjection\Attribute\Autowire;
|
||||
use TYPO3\CMS\Core\Cache\Frontend\FrontendInterface;
|
||||
use TYPO3\CMS\Core\Imaging\IconFactory;
|
||||
use TYPO3\CMS\Core\Imaging\IconProvider\SvgIconProvider;
|
||||
use TYPO3\CMS\Core\Imaging\IconSize;
|
||||
use TYPO3\CMS\Core\Localization\LanguageService;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
|
||||
/**
|
||||
* ViewHelper to render a permission icon group (user / group / others) of the "Access" module,
|
||||
* using native PHP instead of Fluid for performance reasons.
|
||||
*
|
||||
* ```
|
||||
* <beuser:permissions permission="{data.row.perms_user}" scope="user" pageId="{data.row.uid}" />
|
||||
* ```
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class PermissionsViewHelper extends AbstractViewHelper
|
||||
{
|
||||
private const array MASKS = [1, 16, 2, 4, 8];
|
||||
|
||||
/**
|
||||
* As this ViewHelper renders HTML, the output must not be escaped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function __construct(
|
||||
private readonly IconFactory $iconFactory,
|
||||
#[Autowire(service: 'cache.runtime')]
|
||||
private readonly FrontendInterface $cachePermissionLabels
|
||||
) {}
|
||||
|
||||
public function initializeArguments(): void
|
||||
{
|
||||
$this->registerArgument('permission', 'int', 'Current permission', true);
|
||||
$this->registerArgument('scope', 'string', '"user" / "group" / "everybody"', true);
|
||||
$this->registerArgument('pageId', 'int', 'Page ID to evaluate permission for', true);
|
||||
}
|
||||
|
||||
public function render(): string
|
||||
{
|
||||
$icon = '';
|
||||
foreach (self::MASKS as $mask) {
|
||||
if ($this->arguments['permission'] & $mask) {
|
||||
$iconIdentifier = 'actions-check';
|
||||
$iconClass = 'text-success';
|
||||
$mode = 'delete';
|
||||
} else {
|
||||
$iconIdentifier = 'actions-close';
|
||||
$iconClass = 'text-danger';
|
||||
$mode = 'add';
|
||||
}
|
||||
|
||||
$label = $this->resolvePermissionLabel($mask);
|
||||
$icon .= '<button'
|
||||
. ' aria-label="' . htmlspecialchars($label) . ', ' . htmlspecialchars($mode) . ', ' . htmlspecialchars($this->arguments['scope']) . '"'
|
||||
. ' title="' . htmlspecialchars($label) . '"'
|
||||
. ' data-page="' . htmlspecialchars((string)$this->arguments['pageId']) . '"'
|
||||
. ' data-permissions="' . htmlspecialchars((string)$this->arguments['permission']) . '"'
|
||||
. ' data-who="' . htmlspecialchars($this->arguments['scope']) . '"'
|
||||
. ' data-bits="' . htmlspecialchars((string)$mask) . '"'
|
||||
. ' data-mode="' . htmlspecialchars($mode) . '"'
|
||||
. ' class="btn btn-default btn-icon btn-borderless change-permission ' . htmlspecialchars($iconClass) . '">'
|
||||
. $this->iconFactory->getIcon($iconIdentifier, IconSize::SMALL)->render(SvgIconProvider::MARKUP_IDENTIFIER_INLINE)
|
||||
. '</button>';
|
||||
}
|
||||
return $icon;
|
||||
}
|
||||
|
||||
private function resolvePermissionLabel(int $mask): string
|
||||
{
|
||||
$cacheIdentifier = 'beuser-viewhelper-permission_' . $mask;
|
||||
if (!$this->cachePermissionLabels->has($cacheIdentifier)) {
|
||||
$this->cachePermissionLabels->set($cacheIdentifier, htmlspecialchars($this->getLanguageService()->sL(
|
||||
'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:' . $mask,
|
||||
)));
|
||||
}
|
||||
return $this->cachePermissionLabels->get($cacheIdentifier);
|
||||
}
|
||||
|
||||
private function getLanguageService(): LanguageService
|
||||
{
|
||||
return $GLOBALS['LANG'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\ViewHelpers;
|
||||
|
||||
use TYPO3\CMS\Core\Imaging\IconFactory;
|
||||
use TYPO3\CMS\Core\Imaging\IconSize;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractViewHelper;
|
||||
|
||||
/**
|
||||
* ViewHelper to display a sprite icon for a record (object).
|
||||
*
|
||||
* ```
|
||||
* <beuser:spriteIconForRecord table="be_groups" object="{backendUserGroup}" />
|
||||
* ```
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class SpriteIconForRecordViewHelper extends AbstractViewHelper
|
||||
{
|
||||
/**
|
||||
* As this ViewHelper renders HTML, the output must not be escaped.
|
||||
*
|
||||
* @var bool
|
||||
*/
|
||||
protected $escapeOutput = false;
|
||||
|
||||
public function __construct(
|
||||
private readonly IconFactory $iconFactory
|
||||
) {}
|
||||
|
||||
public function initializeArguments(): void
|
||||
{
|
||||
parent::initializeArguments();
|
||||
$this->registerArgument('table', 'string', '', true);
|
||||
$this->registerArgument('object', 'object', '', true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Displays spriteIcon for database table and object
|
||||
*/
|
||||
public function render(): string
|
||||
{
|
||||
$object = $this->arguments['object'];
|
||||
$table = $this->arguments['table'];
|
||||
|
||||
if (!method_exists($object, 'getUid')) {
|
||||
return '';
|
||||
}
|
||||
$row = [
|
||||
'uid' => $object->getUid(),
|
||||
'startTime' => false,
|
||||
'endTime' => false,
|
||||
];
|
||||
if (method_exists($object, 'getIsDisabled')) {
|
||||
$row['disable'] = $object->getIsDisabled();
|
||||
}
|
||||
if (method_exists($object, 'getHidden')) {
|
||||
$row['hidden'] = $object->getHidden();
|
||||
}
|
||||
if (method_exists($object, 'getStartDateAndTime')) {
|
||||
$row['startTime'] = $object->getStartDateAndTime();
|
||||
}
|
||||
if (method_exists($object, 'getEndDateAndTime')) {
|
||||
$row['endTime'] = $object->getEndDateAndTime();
|
||||
}
|
||||
return $this->iconFactory->getIconForRecord($table, $row, IconSize::SMALL)->render();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
|
||||
namespace TYPO3\CMS\Beuser\ViewHelpers;
|
||||
|
||||
use TYPO3\CMS\Beuser\Domain\Model\BackendUser;
|
||||
use TYPO3\CMS\Core\Authentication\BackendUserAuthentication;
|
||||
use TYPO3\CMS\Core\Imaging\IconFactory;
|
||||
use TYPO3\CMS\Core\Imaging\IconSize;
|
||||
use TYPO3\CMS\Core\Localization\LanguageService;
|
||||
use TYPO3Fluid\Fluid\Core\ViewHelper\AbstractTagBasedViewHelper;
|
||||
|
||||
/**
|
||||
* ViewHelper to displays a 'SwitchUser' button to change the current backend user to the target backend user.
|
||||
*
|
||||
* ```
|
||||
* <beuser:SwitchUser class="btn btn-default" backendUser="{backendUser}" />
|
||||
* ```
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class SwitchUserViewHelper extends AbstractTagBasedViewHelper
|
||||
{
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $tagName = 'typo3-backend-switch-user';
|
||||
|
||||
public function __construct(
|
||||
private readonly IconFactory $iconFactory
|
||||
) {
|
||||
parent::__construct();
|
||||
}
|
||||
|
||||
public function initializeArguments(): void
|
||||
{
|
||||
parent::initializeArguments();
|
||||
$this->registerArgument('backendUser', BackendUser::class, 'Target backendUser to switch active session to', true);
|
||||
}
|
||||
|
||||
public function render(): string
|
||||
{
|
||||
/** @var BackendUser $targetUser */
|
||||
$targetUser = $this->arguments['backendUser'];
|
||||
$currentUser = self::getBackendUserAuthentication();
|
||||
|
||||
if ((int)$targetUser->getUid() === (int)$currentUser->getUserId()
|
||||
|| !$targetUser->isActive()
|
||||
|| !$currentUser->isAdmin()
|
||||
|| $currentUser->getOriginalUserIdWhenInSwitchUserMode() !== null
|
||||
) {
|
||||
$this->tag->setTagName('span');
|
||||
$this->tag->addAttribute('class', $this->tag->getAttribute('class') . ' disabled');
|
||||
$this->tag->addAttribute('disabled', 'disabled');
|
||||
$this->tag->setContent($this->iconFactory->getIcon('empty-empty', IconSize::SMALL)->render());
|
||||
} else {
|
||||
$this->tag->addAttribute('title', self::getLanguageService()->sL('LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:switchBackMode'));
|
||||
$this->tag->addAttribute('targetUser', (string)$targetUser->getUid());
|
||||
$this->tag->setContent($this->iconFactory->getIcon('actions-system-backend-user-switch', IconSize::SMALL)->render());
|
||||
}
|
||||
|
||||
$this->tag->forceClosingTag(true);
|
||||
return $this->tag->render();
|
||||
}
|
||||
|
||||
private static function getBackendUserAuthentication(): BackendUserAuthentication
|
||||
{
|
||||
return $GLOBALS['BE_USER'];
|
||||
}
|
||||
|
||||
private static function getLanguageService(): LanguageService
|
||||
{
|
||||
return $GLOBALS['LANG'];
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Definitions for routes provided by EXT:beuser
|
||||
*/
|
||||
return [
|
||||
// Dispatch the permissions actions
|
||||
'user_access_permissions' => [
|
||||
'path' => '/users/access/permissions',
|
||||
'target' => \TYPO3\CMS\Beuser\Controller\PermissionController::class . '::handleAjaxRequest',
|
||||
'inheritAccessFromModule' => 'permissions_pages',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
|
||||
use TYPO3\CMS\Beuser\Controller\BackendUserController;
|
||||
use TYPO3\CMS\Beuser\Controller\PermissionController;
|
||||
|
||||
/**
|
||||
* Definitions for modules provided by EXT:beuser
|
||||
*/
|
||||
return [
|
||||
'permissions_pages' => [
|
||||
'parent' => 'admin',
|
||||
'position' => ['after' => 'scheduler'],
|
||||
'access' => 'admin',
|
||||
'path' => '/module/users/permissions',
|
||||
'iconIdentifier' => 'module-permission',
|
||||
'navigationComponent' => '@typo3/backend/tree/page-tree-element',
|
||||
'labels' => 'beuser.modules.permissions',
|
||||
'aliases' => ['system_BeuserTxPermission'],
|
||||
'routes' => [
|
||||
'_default' => [
|
||||
'target' => PermissionController::class . '::handleRequest',
|
||||
],
|
||||
],
|
||||
],
|
||||
'backend_user_management' => [
|
||||
'parent' => 'admin',
|
||||
'position' => ['before' => '*'],
|
||||
'access' => 'admin',
|
||||
'path' => '/module/users/management',
|
||||
'iconIdentifier' => 'module-user',
|
||||
'labels' => 'beuser.modules.user_management',
|
||||
'aliases' => ['system_BeuserTxBeuser'],
|
||||
'extensionName' => 'Beuser',
|
||||
'controllerActions' => [
|
||||
BackendUserController::class => [
|
||||
'index',
|
||||
'list',
|
||||
'show',
|
||||
'addToCompareList',
|
||||
'removeFromCompareList',
|
||||
'removeAllFromCompareList',
|
||||
'compare',
|
||||
'online',
|
||||
'terminateBackendUserSession',
|
||||
'initiatePasswordReset',
|
||||
'groups',
|
||||
'showGroup',
|
||||
'addGroupToCompareList',
|
||||
'removeGroupFromCompareList',
|
||||
'removeAllGroupsFromCompareList',
|
||||
'compareGroups',
|
||||
'filemounts',
|
||||
],
|
||||
],
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
return [
|
||||
\TYPO3\CMS\Beuser\Domain\Model\BackendUser::class => [
|
||||
'tableName' => 'be_users',
|
||||
'properties' => [
|
||||
'userName' => [
|
||||
'fieldName' => 'username',
|
||||
],
|
||||
'isAdministrator' => [
|
||||
'fieldName' => 'admin',
|
||||
],
|
||||
'isDisabled' => [
|
||||
'fieldName' => 'disable',
|
||||
],
|
||||
'realName' => [
|
||||
'fieldName' => 'realName',
|
||||
],
|
||||
'startDateAndTime' => [
|
||||
'fieldName' => 'starttime',
|
||||
],
|
||||
'endDateAndTime' => [
|
||||
'fieldName' => 'endtime',
|
||||
],
|
||||
'lastLoginDateAndTime' => [
|
||||
'fieldName' => 'lastlogin',
|
||||
],
|
||||
'allowedLanguages' => [
|
||||
'fieldName' => 'allowed_languages',
|
||||
],
|
||||
'fileMountPoints' => [
|
||||
'fieldName' => 'file_mountpoints',
|
||||
],
|
||||
'dbMountPoints' => [
|
||||
'fieldName' => 'db_mountpoints',
|
||||
],
|
||||
'backendUserGroups' => [
|
||||
'fieldName' => 'usergroup',
|
||||
],
|
||||
],
|
||||
],
|
||||
\TYPO3\CMS\Beuser\Domain\Model\BackendUserGroup::class => [
|
||||
'tableName' => 'be_groups',
|
||||
'properties' => [
|
||||
'subGroups' => [
|
||||
'fieldName' => 'subgroup',
|
||||
],
|
||||
],
|
||||
],
|
||||
\TYPO3\CMS\Beuser\Domain\Model\FileMount::class => [
|
||||
'tableName' => 'sys_filemounts',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,11 @@
|
||||
<?php
|
||||
|
||||
return [
|
||||
'dependencies' => [
|
||||
'backend',
|
||||
'core',
|
||||
],
|
||||
'imports' => [
|
||||
'@typo3/beuser/' => 'EXT:beuser/Resources/Public/JavaScript/',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,8 @@
|
||||
services:
|
||||
_defaults:
|
||||
autowire: true
|
||||
autoconfigure: true
|
||||
public: false
|
||||
|
||||
TYPO3\CMS\Beuser\:
|
||||
resource: '../Classes/*'
|
||||
+339
@@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
==========================
|
||||
TYPO3 extension ``beuser``
|
||||
==========================
|
||||
|
||||
The TYPO3 backend module `Administration > Users` is managing backend users and
|
||||
groups.
|
||||
|
||||
It allows you to add / delete / modify backend users and groups, configure and
|
||||
compare the settings of backend users and verify their permissions. This module
|
||||
also displays any backend users who are currently logged in.
|
||||
|
||||
Additionally it is possible to display a list / add / delete / modify
|
||||
file mounts in a separate submodule.
|
||||
|
||||
:Repository: https://github.com/typo3/typo3
|
||||
:Issues: https://forge.typo3.org/
|
||||
:Read online: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Backend/AccessControl/UsersAndGroups/
|
||||
:Packagist: https://packagist.org/packages/typo3/cms-beuser
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:beuser/Resources/Private/Language/Modules/permissions.xlf" date="2026-11-10T13:37:37Z" product-name="permissions">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="title">
|
||||
<source>Permissions</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="short_description">
|
||||
<source>Manage page access permissions</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description">
|
||||
<source>Administers which backend users and groups can access and edit pages in the site tree. For each page, an owner user and group can be assigned, and read, write, and edit permissions defined. These settings control who can view or modify content within the page hierarchy.</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:beuser/Resources/Private/Language/Modules/user_management.xlf" date="2026-11-10T13:37:37Z" product-name="user_management">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="title">
|
||||
<source>Users</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="short_description">
|
||||
<source>Backend users management</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="description">
|
||||
<source>Administers backend user accounts and groups, and defines access permissions on records, files, and modules. Page-level read and write permissions can be managed separately in the Permissions module.</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,430 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:beuser/Resources/Private/Language/locallang.xlf" date="2023-02-15T18:03:32Z" product-name="beuser">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="userName">
|
||||
<source>Username</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="avatar">
|
||||
<source>Avatar</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="realName">
|
||||
<source>Real name</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="name">
|
||||
<source>Name</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="email">
|
||||
<source>Email</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="admin">
|
||||
<source>Admin</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="users">
|
||||
<source>Users</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="user">
|
||||
<source>User</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="yes">
|
||||
<source>Yes</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="no">
|
||||
<source>No</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="never">
|
||||
<source>Never</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="disable">
|
||||
<source>Enabled</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="startDateAndTime">
|
||||
<source>Start</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="endDateAndTime">
|
||||
<source>Stop</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="lastLogin">
|
||||
<source>Last login</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="allowedLanguages">
|
||||
<source>Limit to languages</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pageTreeEntryPoints">
|
||||
<source>Page Tree Entry Points</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="fileMounts">
|
||||
<source>File mountpoints</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="groups">
|
||||
<source>Groups</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="inheritance">
|
||||
<source>Inheritance</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="group">
|
||||
<source>Group</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="languages">
|
||||
<source>Languages</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="categories">
|
||||
<source>Categories</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="permissions">
|
||||
<source>Permissions</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="modules">
|
||||
<source>Modules</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tableModes.read">
|
||||
<source>Read</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="tableModes.write">
|
||||
<source>Read & Write</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="mountsWorkspaces">
|
||||
<source>Mounts and workspaces</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="options">
|
||||
<source>Options</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="allowedPageContentTypes">
|
||||
<source>Allowed page content types</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="generalPermissions">
|
||||
<source>General permissions</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="compare.tables">
|
||||
<source>Table permissions</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="compare.direct.inherit">
|
||||
<source>Inherit</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="compare.direct.direct">
|
||||
<source>Direct</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="information.defaultLanguage">
|
||||
<source>Default</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="information.defaultWorkspace">
|
||||
<source>Default</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="information.groups.table.column.groupTitle">
|
||||
<source>Group title</source>
|
||||
</trans-unit>
|
||||
<!-- Docheader menu / Shortcut button title -->
|
||||
<trans-unit id="backendUser">
|
||||
<source>Backend User</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup">
|
||||
<source>Backend User Group</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUsers">
|
||||
<source>Backend users</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserDetails">
|
||||
<source>Backend user details</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroupsMenu">
|
||||
<source>Backend user groups</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroupDetails">
|
||||
<source>Backend user group details</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="compareBackendUsers">
|
||||
<source>Compare backend users</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="compareBackendUsersGroups">
|
||||
<source>Compare backend user groups</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="onlineUsers">
|
||||
<source>Online users</source>
|
||||
</trans-unit>
|
||||
<!-- Button / Links -->
|
||||
<trans-unit id="btn.addToCompareList">
|
||||
<source>Add to compare list</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.backendUser.create">
|
||||
<source>Create new backend user</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.editor.create">
|
||||
<source>Create editor</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.admin.create">
|
||||
<source>Create admin</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.backendUserGroup.create">
|
||||
<source>Create new backend user group</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.clearCompareList">
|
||||
<source>Clear compare list</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.compare">
|
||||
<source>Compare</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.delete">
|
||||
<source>Delete</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.details">
|
||||
<source>Show details</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.disable">
|
||||
<source>Disable</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.edit">
|
||||
<source>Edit</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.enable">
|
||||
<source>Enable</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.info">
|
||||
<source>Info</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="btn.removeFromCompareList">
|
||||
<source>Remove from compare list</source>
|
||||
</trans-unit>
|
||||
<!-- Filter -->
|
||||
<trans-unit id="filter">
|
||||
<source>Filter</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="reset">
|
||||
<source>Reset</source>
|
||||
</trans-unit>
|
||||
<!-- Pagination -->
|
||||
<trans-unit id="pagination.previous">
|
||||
<source>previous</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pagination.next">
|
||||
<source>next</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pagination.first">
|
||||
<source>first</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pagination.last">
|
||||
<source>last</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pagination.records">
|
||||
<source>Records</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pagination.page">
|
||||
<source>Page</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pagination.refresh">
|
||||
<source>Refresh</source>
|
||||
</trans-unit>
|
||||
<!-- Backend users: General (ViewHelper labels, etc.) -->
|
||||
<trans-unit id="switchBackMode">
|
||||
<source>Switch to user</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="lockedMfaProviders">
|
||||
<source>Locked MFA providers</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="mfaEnabled">
|
||||
<source>MFA enabled</source>
|
||||
</trans-unit>
|
||||
<!-- Backend users: List -->
|
||||
<trans-unit id="backendUser.list.title">
|
||||
<source>Backend users</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.section.compare">
|
||||
<source>Backend users to compare</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.section.allUsers">
|
||||
<source>Backend users in the system</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.btn.compareList">
|
||||
<source>Compare selected backend users</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.table.column.group">
|
||||
<source>Group</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.group">
|
||||
<source>Group</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.loginState">
|
||||
<source>Login state</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.loginState.all">
|
||||
<source>All</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.loginState.loginBefore">
|
||||
<source>Logged in before</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.loginState.never">
|
||||
<source>Never logged in</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.loginState.loggedIn">
|
||||
<source>Currently logged in</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.status">
|
||||
<source>Status</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.status.all">
|
||||
<source>All</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.status.enabled">
|
||||
<source>Enabled</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.status.disabled">
|
||||
<source>Disabled</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.userType">
|
||||
<source>Type</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.userType.all">
|
||||
<source>All</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.userType.admin">
|
||||
<source>Admin</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.filter.userType.normalUser">
|
||||
<source>Normal user</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.list.label.online">
|
||||
<source>online</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.confirmDelete">
|
||||
<source>Are you sure you want to delete the backend user '%s'?</source>
|
||||
</trans-unit>
|
||||
<!-- Backend users: Show -->
|
||||
<trans-unit id="backendUser.show.title">
|
||||
<source>Configuration of backend user "%s"</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.show.notConfigured">
|
||||
<source>Not configured.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.show.infobox.title">
|
||||
<source>Compiled rights and settings</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.show.infobox.message">
|
||||
<source>This view displays all compiled rights and settings of the selected backend user. These can come from settings in the backend user record itself, as well as from settings that have been stored in backend user groups assigned to this backend user.</source>
|
||||
</trans-unit>
|
||||
<!-- Backend users: Compare -->
|
||||
<trans-unit id="backendUser.compare.title">
|
||||
<source>Compare backend users</source>
|
||||
</trans-unit>
|
||||
<!-- Backend users: Online -->
|
||||
<trans-unit id="backendUser.online.title">
|
||||
<source>Online users</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.online.table.column.ipAddress">
|
||||
<source>IP address</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.online.table.column.lastAccess">
|
||||
<source>Last access</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.online.activeSession">
|
||||
<source>Active session</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.online.flashMessage.terminateSessionSuccess">
|
||||
<source>Session successfully terminated.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.online.reallyLogout">
|
||||
<source>Really logout</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUser.online.endSession">
|
||||
<source>End session</source>
|
||||
</trans-unit>
|
||||
<!-- Backend user groups: List -->
|
||||
<trans-unit id="backendUserGroup.list.title">
|
||||
<source>Backend user groups</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.noGroupsFound.title">
|
||||
<source>No backend user groups found</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.noGroupsFound.message">
|
||||
<source>There are currently no backend user groups found in the database.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.list.section.compare">
|
||||
<source>Backend user groups to compare</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.list.section.allUserGroups">
|
||||
<source>Backend user groups in the system</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.list.btn.compareList">
|
||||
<source>Compare selected backend user groups</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.list.filter.groupTitle">
|
||||
<source>Group title or group ID</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.list.table.column.groupTitle">
|
||||
<source>Group title</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.list.table.column.subgroup">
|
||||
<source>Inherit settings from groups</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.confirmDelete">
|
||||
<source>Are you sure you want to delete the backend user group '%s'?</source>
|
||||
</trans-unit>
|
||||
<!-- Backend user groups: Show -->
|
||||
<trans-unit id="backendUserGroup.show.title">
|
||||
<source>Configuration of backend user group "%s"</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.show.notConfigured">
|
||||
<source>Not configured.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.show.infobox.title">
|
||||
<source>Compiled rights and settings</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="backendUserGroup.show.infobox.message">
|
||||
<source>This view displays all compiled rights and settings of the selected backend user group. These can come from settings in the backend user group record itself, as well as from settings that have been stored in backend user groups assigned to this backend user group.</source>
|
||||
</trans-unit>
|
||||
<!-- Backend user groups: Compare -->
|
||||
<trans-unit id="backendUserGroup.compare.title">
|
||||
<source>Compare backend user groups</source>
|
||||
</trans-unit>
|
||||
<!-- File mounts -->
|
||||
<trans-unit id="filemounts">
|
||||
<source>File mounts</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filemount.list.title">
|
||||
<source>File Mounts</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filemount.confirm.deletion">
|
||||
<source>Are you sure, that you want to delete the file mount "%s"?</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filemount.create">
|
||||
<source>Create new file mount</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filemount.infobox.noFilemountFound.title">
|
||||
<source>No file mount found</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filemount.infobox.noFilemountFound.message">
|
||||
<source>Please create a file mount and select its entry point.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filemount.link.openInFilelist">
|
||||
<source>Open in file list</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filemount.amount.multiple">
|
||||
<source>File mounts</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="filemount.amount.singular">
|
||||
<source>File mount</source>
|
||||
</trans-unit>
|
||||
<!-- Password reset -->
|
||||
<trans-unit id="flashMessage.resetPassword.error.title">
|
||||
<source>Password reset not triggered</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="flashMessage.resetPassword.error.text">
|
||||
<source>Sorry, the password of this user cannot be reset.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="flashMessage.resetPassword.success.title">
|
||||
<source>Password reset triggered</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="flashMessage.resetPassword.success.text">
|
||||
<source>Password reset for email address %s initiated.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="resetPassword.label">
|
||||
<source>Reset Password</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="resetPassword.confirmation.header">
|
||||
<source>Reset Password</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="resetPassword.confirmation.text">
|
||||
<source>Are you sure you want to reset the password for %s?</source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,134 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xliff xmlns="urn:oasis:names:tc:xliff:document:1.2" version="1.2">
|
||||
<file source-language="en" datatype="plaintext" original="EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf" date="2011-10-17T20:22:34Z" product-name="lang">
|
||||
<header/>
|
||||
<body>
|
||||
<trans-unit id="permissions">
|
||||
<source>Permissions</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="ch_permissions">
|
||||
<source>Change permissions</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Legend">
|
||||
<source>Legend</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Owner">
|
||||
<source>Owner</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Group">
|
||||
<source>Group</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Everybody">
|
||||
<source>Everybody</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="EditLock_descr">
|
||||
<source>Disable the »Admin-only« edit lock for this page. Currently this page and all content is locked for editing by all non-Admin users.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="EditLock_descr2">
|
||||
<source>Enable the »Admin-only« edit lock for this page</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Save">
|
||||
<source>Save</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Abort">
|
||||
<source>Abort</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Edit">
|
||||
<source>EDIT</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="recursive">
|
||||
<source>Set recursively</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="page_affected">
|
||||
<source>page affected</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="pages_affected">
|
||||
<source>pages affected</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="user_overview">
|
||||
<source>User overview</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Mode">
|
||||
<source>Mode</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="Depth">
|
||||
<source>Depth</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="level">
|
||||
<source>level</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="levels">
|
||||
<source>levels</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="User">
|
||||
<source>User</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="changeOwner">
|
||||
<source>Change owner</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="changeGroup">
|
||||
<source>Change group</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="def">
|
||||
<source>Definition: 'content' is records from all tables on a page - except from records from the table 'pages' (Pages).</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="A_Granted">
|
||||
<source>Access Granted</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="A_Denied">
|
||||
<source>Access Denied</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="1">
|
||||
<source>Show page</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="16">
|
||||
<source>Edit content</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="2">
|
||||
<source>Edit page</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="4">
|
||||
<source>Delete page</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="8">
|
||||
<source>New pages</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="1_t">
|
||||
<source>Show/Copy page and content.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="16_t">
|
||||
<source>Change/Add/Delete/Move content.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="2_t">
|
||||
<source>Change page eg. change pagetitle etc.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="4_t">
|
||||
<source>Delete/Move page and content.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="8_t">
|
||||
<source>Create new pages under this page.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkspaceWarning">
|
||||
<source>Workspace Warning</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="WorkspaceWarningText">
|
||||
<source>Permissions set in a workspace take effect only after the related elements are published. To apply permissions immediately, configure them in the Live workspace. (Permissions are always evaluated based on the Live workspace record or the placeholder of a draft version)</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="notSet">
|
||||
<source>not set</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="deleted">
|
||||
<source>deleted</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="noGroups">
|
||||
<source>No user groups exist.</source>
|
||||
</trans-unit>
|
||||
<trans-unit id="selectNone">
|
||||
<source> - none - </source>
|
||||
</trans-unit>
|
||||
<trans-unit id="selectUnchanged">
|
||||
<source> - leave unchanged - </source>
|
||||
</trans-unit>
|
||||
</body>
|
||||
</file>
|
||||
</xliff>
|
||||
@@ -0,0 +1,9 @@
|
||||
<html
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:render section="headline" />
|
||||
<f:render section="content" />
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,80 @@
|
||||
<html
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:form action="list" objectName="demand" object="{demand}">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="tx_Beuser_username" class="form-label"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:userName" /></label>
|
||||
<f:form.textfield
|
||||
type="search"
|
||||
autocomplete="off"
|
||||
id="tx_Beuser_username"
|
||||
class="form-control"
|
||||
property="userName"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tx_Beuser_usertype" class="form-label"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.filter.userType" /></label>
|
||||
<f:form.select
|
||||
id="tx_Beuser_usertype"
|
||||
class="form-select"
|
||||
property="userType"
|
||||
options="{
|
||||
0: '{f:translate(key:\"backendUser.list.filter.userType.all\")}',
|
||||
1: '{f:translate(key:\"backendUser.list.filter.userType.admin\")}',
|
||||
2: '{f:translate(key:\"backendUser.list.filter.userType.normalUser\")}'
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tx_Beuser_status" class="form-label"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.filter.status" /></label>
|
||||
<f:form.select
|
||||
id="tx_Beuser_status"
|
||||
class="form-select"
|
||||
property="status"
|
||||
options="{
|
||||
0: '{f:translate(key:\"backendUser.list.filter.status.all\")}',
|
||||
1: '{f:translate(key:\"backendUser.list.filter.status.enabled\")}',
|
||||
2: '{f:translate(key:\"backendUser.list.filter.status.disabled\")}'
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tx_Beuser_logins" class="form-label"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.filter.loginState" /></label>
|
||||
<f:form.select
|
||||
id="tx_Beuser_logins"
|
||||
class="form-select"
|
||||
property="logins"
|
||||
options="{
|
||||
0: '{f:translate(key:\"backendUser.list.filter.loginState.all\")}',
|
||||
1: '{f:translate(key:\"backendUser.list.filter.loginState.loginBefore\")}',
|
||||
2: '{f:translate(key:\"backendUser.list.filter.loginState.never\")}',
|
||||
3: '{f:translate(key:\"backendUser.list.filter.loginState.loggedIn\")}'
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="tx_beuser_backendUserGroup" class="form-label"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.filter.group" /></label>
|
||||
<f:form.select
|
||||
id="tx_beuser_backendUserGroup"
|
||||
class="form-select"
|
||||
property="backendUserGroup"
|
||||
options="{backendUserGroups}"
|
||||
optionLabelField="title"
|
||||
optionValueField="uid"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group align-self-end">
|
||||
<f:form.button type="submit" name="operation" value="filter" class="btn btn-default">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filter" />
|
||||
</f:form.button>
|
||||
<f:form.button type="submit" name="operation" value="reset-filters" class="btn btn-link">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:reset" />
|
||||
</f:form.button>
|
||||
</div>
|
||||
</div>
|
||||
</f:form>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,223 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:beuser="http://typo3.org/ns/TYPO3/CMS/Beuser/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<div class="table-fit">
|
||||
<table id="typo3-backend-user-list" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:userName" /> / <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:realName" /></th>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.table.column.group" /></th>
|
||||
<th class="col-datetime"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:lastLogin" /></th>
|
||||
<th class="col-control"><span class="visually-hidden"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels._CONTROL_" /></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{paginator.paginatedItems}" as="backendUser">
|
||||
<tr>
|
||||
<td class="col-indicator">
|
||||
<f:if condition="{onlineBackendUsers.{backendUser.uid}}">
|
||||
<typo3-backend-status-indicator state="success" live label="{f:translate(key:'backendUser.list.label.online', domain:'beuser.messages')}"></typo3-backend-status-indicator>
|
||||
</f:if>
|
||||
</td>
|
||||
<td class="col-avatar">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="be_users"
|
||||
data-contextmenu-uid="{backendUser.uid}"
|
||||
title="{f:if(condition: '{backendUser.description}', then: '{backendUser.description} (id={backendUser.uid})', else: 'id={backendUser.uid}')}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<backend:avatar backendUser="{backendUser.uid}" showIcon="TRUE" />
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-50">
|
||||
<backend:link.editRecord table="be_users" uid="{backendUser.uid}" title="{f:translate(key:'btn.edit')}">
|
||||
<f:if condition="{backendUser.realName}">
|
||||
<f:then>
|
||||
{backendUser.realName}
|
||||
<beuser:mfaStatus userUid="{backendUser.uid}"/><br>
|
||||
<span class="text-variant">({backendUser.username})</span>
|
||||
</f:then>
|
||||
<f:else>
|
||||
{backendUser.username}
|
||||
<beuser:mfaStatus userUid="{backendUser.uid}"/>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
<td class="col-50 nowrap-disabled">
|
||||
<f:for each="{backendUser.backendUserGroups}" as="backendUserGroup" iteration="backendUserGroupIterator">
|
||||
<backend:link.editRecord table="be_groups" uid="{backendUserGroup.uid}" title="{f:translate(key:'btn.edit')}" class="nowrap">{backendUserGroup.title}</backend:link.editRecord><f:if condition="!{backendUserGroupIterator.isLast}">,</f:if>
|
||||
</f:for>
|
||||
</td>
|
||||
<td class="col-datetime">
|
||||
<f:if condition="{backendUser.lastLoginDateAndTime}">
|
||||
<f:then>
|
||||
<f:format.date format="{dateFormat} {timeFormat}">{backendUser.lastLoginDateAndTime}</f:format.date>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:never" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
<td class="col-control">
|
||||
<div class="btn-group" role="group">
|
||||
<backend:link.editRecord
|
||||
class="btn btn-default"
|
||||
table="be_users"
|
||||
uid="{backendUser.uid}"
|
||||
title="{f:translate(key:'btn.edit')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-open" />
|
||||
</backend:link.editRecord>
|
||||
<f:if condition="{backendUser.currentlyLoggedIn} == 1">
|
||||
<f:then>
|
||||
<span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{backendUser.isDisabled} == 1">
|
||||
<f:then>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="{backend:moduleLink(route:'tce_db', query:'data[be_users][{backendUser.uid}][disable]=0', currentUrlParameterName:'redirect')}"
|
||||
title="{f:translate(key:'btn.enable')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-edit-unhide" />
|
||||
</a>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="{backend:moduleLink(route:'tce_db', query:'data[be_users][{backendUser.uid}][disable]=1', currentUrlParameterName:'redirect')}"
|
||||
title="{f:translate(key:'btn.disable')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-edit-hide" />
|
||||
</a>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{currentUserUid} == {backendUser.uid}">
|
||||
<f:then>
|
||||
<span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<form action="{backend:moduleLink(route:'tce_db', currentUrlParameterName:'redirect')}" name="be_user_remove_{backendUser.uid}" id="be_user_remove_{backendUser.uid}" method="post">
|
||||
<input name="cmd[be_users][{backendUser.uid}][delete]=1" type="hidden" value="{group.uid}">
|
||||
</form>
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-default t3js-modal-trigger"
|
||||
data-target-form="be_user_remove_{backendUser.uid}"
|
||||
title="{f:translate(key:'btn.delete')}"
|
||||
data-severity="warning"
|
||||
data-title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title')}"
|
||||
data-content="{f:translate(key:'backendUser.confirmDelete',arguments:'{0:backendUser.userName}')}"
|
||||
data-button-close-text="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
|
||||
data-button-ok-text="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:buttons.confirm.delete_record.yes')}"
|
||||
>
|
||||
<core:icon identifier="actions-edit-delete" />
|
||||
</button>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
<div class="btn-group" role="group">
|
||||
<f:if condition="{backendUser.passwordResetEnabled}">
|
||||
<f:then>
|
||||
<f:form.button
|
||||
name="user"
|
||||
value="{backendUser.uid}"
|
||||
form="form-initiate-password-reset"
|
||||
class="btn btn-default t3js-modal-trigger"
|
||||
title="{f:translate(key: 'resetPassword.label')}"
|
||||
type="submit"
|
||||
data-severity="warning"
|
||||
data-title="{f:translate(key: 'resetPassword.confirmation.header')}"
|
||||
data-content="{f:translate(key: 'resetPassword.confirmation.text', arguments: {0: '{backendUser.email}'})}"
|
||||
data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}">
|
||||
<core:icon identifier="actions-key" />
|
||||
</f:form.button>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<span class="btn btn-default disabled"><core:icon identifier="empty-empty" /></span>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:link.action
|
||||
action="show"
|
||||
arguments="{uid: backendUser.uid}"
|
||||
class="btn btn-default"
|
||||
title="{f:translate(key: 'btn.details')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-system-options-view" size="small"/>
|
||||
</f:link.action>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="#"
|
||||
title="{f:translate(key:'btn.info')}"
|
||||
data-dispatch-action="TYPO3.InfoWindow.showItem"
|
||||
data-dispatch-args-list="be_users,{backendUser.uid}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-document-info" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="btn-group" role="group">
|
||||
<f:if condition="{compareUserUidList.{backendUser.uid}}">
|
||||
<f:then>
|
||||
<f:form.button
|
||||
form="form-remove-from-compare-list"
|
||||
name="uid"
|
||||
value="{backendUser.uid}"
|
||||
type="submit"
|
||||
class="btn btn-default"
|
||||
title="{f:translate(key: 'btn.removeFromCompareList')}"
|
||||
>
|
||||
<core:icon identifier="actions-minus" size="small"/>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.compare" />
|
||||
</f:form.button>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:form.button
|
||||
form="form-add-to-compare-list"
|
||||
name="uid"
|
||||
value="{backendUser.uid}"
|
||||
type="submit"
|
||||
class="btn btn-default"
|
||||
title="{f:translate(key: 'btn.addToCompareList')}"
|
||||
>
|
||||
<core:icon identifier="actions-plus" size="small"/>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.compare" />
|
||||
</f:form.button>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<beuser:SwitchUser class="btn btn-default" backendUser="{backendUser}" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<f:if condition="{totalAmountOfBackendUsers} > 1">
|
||||
<f:then>{totalAmountOfBackendUsers} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:users" /></f:then>
|
||||
<f:else>{totalAmountOfBackendUsers} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:user" /></f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<f:render partial="SimplePagination" arguments="{paginator:paginator, pagination:pagination, actionName:'list'}" />
|
||||
@@ -0,0 +1,27 @@
|
||||
<html
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:form action="groups" objectName="userGroupDto" object="{userGroupDto}">
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label for="tx_Beugroups_title" class="form-label"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.list.filter.groupTitle" /></label>
|
||||
<f:form.textfield
|
||||
id="tx_Beugroups_title"
|
||||
class="form-control"
|
||||
property="title"
|
||||
/>
|
||||
</div>
|
||||
<div class="form-group align-self-end">
|
||||
<f:form.button type="submit" name="operation" value="filter" class="btn btn-default">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filter" />
|
||||
</f:form.button>
|
||||
<f:form.button type="submit" name="operation" value="reset-filters" class="btn btn-link">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:reset" />
|
||||
</f:form.button>
|
||||
</div>
|
||||
</div>
|
||||
</f:form>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,162 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:beuser="http://typo3.org/ns/TYPO3/CMS/Beuser/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<div class="table-fit">
|
||||
<table id="typo3-backend-user-group-list" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.list.table.column.groupTitle" /></th>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.list.table.column.subgroup" /></th>
|
||||
<th class="col-control"><span class="visually-hidden"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels._CONTROL_" /></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{paginator.paginatedItems}" as="backendUserGroup">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="be_groups"
|
||||
data-contextmenu-uid="{backendUserGroup.uid}"
|
||||
title="{f:if(condition: '{backendUserGroup.description}', then: '{backendUserGroup.description} (id={backendUserGroup.uid})', else: 'id={backendUserGroup.uid}')}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<beuser:spriteIconForRecord table="be_groups" object="{backendUserGroup}" />
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-50">
|
||||
<backend:link.editRecord table="be_groups" uid="{backendUserGroup.uid}" title="{f:translate(key:'btn.edit')}">
|
||||
{backendUserGroup.title}
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
<td class="col-50 nowrap-disabled">
|
||||
<f:for each="{backendUserGroup.subgroups}" as="subgroup" iteration="subGroupIterator">
|
||||
<backend:link.editRecord table="be_groups" uid="{subgroup.uid}" title="{f:translate(key:'btn.edit')}">{subgroup.title}</backend:link.editRecord><f:if condition="!{subGroupIterator.isLast}">,</f:if>
|
||||
</f:for>
|
||||
</td>
|
||||
<td class="col-control">
|
||||
<div class="btn-group" role="group">
|
||||
<backend:link.editRecord
|
||||
class="btn btn-default"
|
||||
table="be_groups"
|
||||
uid="{backendUserGroup.uid}"
|
||||
title="{f:translate(key:'btn.edit')}"
|
||||
>
|
||||
<core:icon identifier="actions-open" />
|
||||
</backend:link.editRecord>
|
||||
<f:if condition="{backendUserGroup.hidden}">
|
||||
<f:then>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="{backend:moduleLink(route:'tce_db', query:'data[be_groups][{backendUserGroup.uid}][hidden]=0', currentUrlParameterName:'redirect')}"
|
||||
title="{f:translate(key:'btn.enable')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-edit-unhide" />
|
||||
</a>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="{backend:moduleLink(route:'tce_db', query:'data[be_groups][{backendUserGroup.uid}][hidden]=1', currentUrlParameterName:'redirect')}"
|
||||
title="{f:translate(key:'btn.disable')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-edit-hide" />
|
||||
</a>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<form action="{backend:moduleLink(route:'tce_db', currentUrlParameterName:'redirect')}" name="be_user_group_remove_{backendUserGroup.uid}" id="be_user_group_remove_{backendUserGroup.uid}" method="post">
|
||||
<input name="cmd[be_groups][{backendUserGroup.uid}][delete]=1" type="hidden" value="{group.uid}">
|
||||
</form>
|
||||
<button
|
||||
type="submit"
|
||||
class="btn btn-default t3js-modal-trigger"
|
||||
data-target-form="be_user_group_remove_{backendUserGroup.uid}"
|
||||
data-severity="warning"
|
||||
data-title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title')}"
|
||||
data-content="{f:translate(key:'backendUserGroup.confirmDelete',arguments:'{0:backendUserGroup.title}')}"
|
||||
data-button-close-text="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
|
||||
data-button-ok-text="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:buttons.confirm.delete_record.yes')}"
|
||||
title="{f:translate(key:'btn.delete')}"
|
||||
>
|
||||
<core:icon identifier="actions-edit-delete"/>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" role="group">
|
||||
<f:link.action
|
||||
action="showGroup"
|
||||
arguments="{uid: backendUserGroup.uid}"
|
||||
class="btn btn-default"
|
||||
title="{f:translate(key: 'btn.details')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-system-options-view" size="small"/>
|
||||
</f:link.action>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="#"
|
||||
title="{f:translate(key:'btn.info')}"
|
||||
data-dispatch-action="TYPO3.InfoWindow.showItem"
|
||||
data-dispatch-args-list="be_groups,{backendUserGroup.uid}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-document-info" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="btn-group" role="group">
|
||||
<f:if condition="{compareGroupUidList.{backendUserGroup.uid}}">
|
||||
<f:then>
|
||||
<f:form.button
|
||||
form="form-remove-group-from-compare-list"
|
||||
name="uid"
|
||||
value="{backendUserGroup.uid}"
|
||||
type="submit"
|
||||
class="btn btn-default"
|
||||
title="{f:translate(key: 'btn.removeFromCompareList')}"
|
||||
>
|
||||
<core:icon identifier="actions-minus" size="small"/>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.compare" />
|
||||
</f:form.button>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:form.button
|
||||
form="form-add-group-to-compare-list"
|
||||
name="uid"
|
||||
value="{backendUserGroup.uid}"
|
||||
type="submit"
|
||||
class="btn btn-default"
|
||||
title="{f:translate(key: 'btn.addToCompareList')}"
|
||||
>
|
||||
<core:icon identifier="actions-plus" size="small"/> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.compare" />
|
||||
</f:form.button>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<f:if condition="{totalAmountOfBackendUserGroups} > 1">
|
||||
<f:then>{totalAmountOfBackendUserGroups} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:groups" /></f:then>
|
||||
<f:else>{totalAmountOfBackendUserGroups} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:group" /></f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<f:render partial="SimplePagination" arguments="{paginator:paginator, pagination:pagination, actionName:'groups'}" />
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,489 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:beuser="http://typo3.org/ns/TYPO3/CMS/Beuser/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:section name="languages">
|
||||
<f:if condition="{languages}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{languages}" key="languageId" as="language">
|
||||
<tr>
|
||||
<f:if condition="{languageId} == 0">
|
||||
<f:then>
|
||||
<td class="col-icon"></td>
|
||||
<td class="col-title">
|
||||
{language.title} (<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:information.defaultLanguage" />)<f:if condition="{showUid}"> <code>[{languageId}]</code></f:if>
|
||||
</td>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<td class="col-icon">
|
||||
<span title="id={languageId}"><core:icon identifier="{language.flagIconIdentifier}" /></span>
|
||||
</td>
|
||||
<td class="col-title">{language.title}<f:if condition="{showUid}"> <code>[{languageId}]</code></f:if></td>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="groups">
|
||||
<f:if condition="{groups.all}">
|
||||
<div class="table-fit">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:information.groups.table.column.groupTitle" /></th>
|
||||
<th{f:if(condition: '{hasColumnClasses}', then: ' class="col-min"')}><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compare.direct.direct" /></th>
|
||||
<th{f:if(condition: '{hasColumnClasses}', then: ' class="col-min"')}><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compare.direct.inherit" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{groups.all}" as="group">
|
||||
<tr>
|
||||
<td class="col-title col-responsive">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="be_groups"
|
||||
data-contextmenu-uid="{group.row.uid}"
|
||||
title="id={group.row.uid}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<core:iconForRecord table="be_groups" row="{group.row}"/>
|
||||
</button>
|
||||
<backend:link.editRecord
|
||||
table="be_groups"
|
||||
uid="{group.row.uid}"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.edit')}"
|
||||
>
|
||||
{group.row.title}<f:if condition="{showUid}"> <code>[{group.row.uid}]</code></f:if>
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
<td{f:if(condition: '{hasColumnClasses}', then: ' class="col-min"')}>
|
||||
<f:if condition="{group.direct}"><span class="text-success"><core:icon identifier="actions-check" size="small" /></span></f:if>
|
||||
</td>
|
||||
<td{f:if(condition: '{hasColumnClasses}', then: ' class="col-min"')}>
|
||||
<f:if condition="{group.diff}"><span class="text-success"><core:icon identifier="actions-check" size="small" /></span></f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="dbMounts">
|
||||
<f:if condition="{dbMounts}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{dbMounts}" as="item">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="pages"
|
||||
data-contextmenu-uid="{item.uid}"
|
||||
title="id={item.uid}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<core:iconForRecord table="pages" row="{item}"/>
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<backend:link.editRecord
|
||||
table="pages"
|
||||
uid="{item.uid}"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.edit')}"
|
||||
>
|
||||
{item.title}<f:if condition="{showUid}"> <code>[{item.uid}]</code></f:if>
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="fileMounts">
|
||||
<f:if condition="{fileMounts}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{fileMounts}" as="item">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="sys_filemounts"
|
||||
data-contextmenu-uid="{item.uid}"
|
||||
title="id={item.uid}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<core:iconForRecord table="sys_filemounts" row="{item}"/>
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<backend:link.editRecord
|
||||
table="sys_filemounts"
|
||||
uid="{item.uid}"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.edit')}"
|
||||
>
|
||||
{item.title}<f:if condition="{showUid}"> <code>[{item.uid}]</code></f:if>
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="fileFolderPermissions">
|
||||
<f:if condition="{fileFolderPermissions}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{fileFolderPermissions}" as="item">
|
||||
<tr>
|
||||
<td class="col-icon"><core:icon identifier="{item.icon}" /></td>
|
||||
<td class="col-title">
|
||||
<f:if condition="{item.label}">
|
||||
<f:then>{f:translate(key:item.label,default:item.label)}</f:then>
|
||||
<f:else>{item.value}</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{showUid}"> <code>[{item.value}]</code></f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="categories">
|
||||
<f:if condition="{categories}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{categories}" as="item">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="sys_category"
|
||||
data-contextmenu-uid="{item.uid}"
|
||||
title="id={item.uid}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<core:iconForRecord table="sys_category" row="{item}"/>
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<backend:link.editRecord
|
||||
table="sys_category"
|
||||
uid="{item.uid}"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.edit')}"
|
||||
>
|
||||
{item.title}<f:if condition="{showUid}"> <code>[{item.uid}]</code></f:if>
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="workspaces">
|
||||
<f:if condition="{workspaces}">
|
||||
<f:if condition="{workspaces.record.uid}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="sys_workspace"
|
||||
data-contextmenu-uid="{workspaces.record.uid}"
|
||||
title="id={workspaces.record.uid}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<core:icon identifier="mimetypes-x-sys_workspace" size="small" />
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<backend:link.editRecord
|
||||
table="sys_workspace"
|
||||
uid="{workspaces.record.uid}"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.edit')}"
|
||||
>{workspaces.record.title}</backend:link.editRecord>
|
||||
(<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:information.defaultWorkspace" />)<f:if condition="{showUid}"> <code>[{workspaces.record.uid}]</code></f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="pageTypes">
|
||||
<f:if condition="{pageTypes}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{pageTypes}" as="item">
|
||||
<tr>
|
||||
<td class="col-icon"><core:icon identifier="{item.icon}" /></td>
|
||||
<td class="col-title">
|
||||
<f:if condition="{item.label}">{f:translate(key:item.label,default:item.label)}</f:if><f:if condition="{showUid}"> <code>[{item.value}]</code></f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="modules">
|
||||
<f:if condition="{modules}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:if condition="{showHeadline}">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:modules" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
</f:if>
|
||||
<tbody>
|
||||
<f:for each="{modules}" as="module">
|
||||
<tr>
|
||||
<td class="col-icon"><core:icon identifier="{module.iconIdentifier}" /></td>
|
||||
<td class="col-title">{f:translate(key: module.title, default: module.title)}<f:if condition="{showUid}"> <code>[{module.identifier}]</code></f:if></td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="tables">
|
||||
<f:if condition="{tables.all}">
|
||||
<f:for each="{tables.all}" key="table" as="label">
|
||||
<f:if condition="{tables.tables_select.{table}} && !{tables.tables_modify.{table}}">
|
||||
<f:variable name="tableReadConfigured" value="1" />
|
||||
</f:if>
|
||||
<f:if condition="{tables.tables_modify.{table}}">
|
||||
<f:variable name="tableReadWriteConfigured" value="1" />
|
||||
</f:if>
|
||||
</f:for>
|
||||
<f:if condition="{tableReadConfigured}">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-read-table-{id}-collapse"
|
||||
aria-controls="permission-group-read-table-{id}-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:tableModes.read" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-read-table-{id}-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{tables.all}" key="table" as="label">
|
||||
<f:if condition="{tables.tables_select.{table}} && !{tables.tables_modify.{table}}">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<core:iconForRecord table="{table}" row="{id: '0'}" />
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<f:if condition="{label}">{f:translate(key:label, default:label)}</f:if><f:if condition="{showUid}"> <code>[{table}]</code></f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{tableReadWriteConfigured}">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-read-write-table-{id}-collapse"
|
||||
aria-controls="permission-group-read-write-table-{id}-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:tableModes.write" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-read-write-table-{id}-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{tables.all}" key="table" as="label">
|
||||
<f:if condition="{tables.tables_modify.{table}}">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<core:iconForRecord table="{table}" row="{id: '0'}" />
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<f:if condition="{label}">{f:translate(key:label, default:label)}</f:if><f:if condition="{showUid}"> <code>[{table}]</code></f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="nonExcludeFields">
|
||||
<f:if condition="{nonExcludeFields}">
|
||||
<f:for each="{nonExcludeFields}" key="tableName" as="table">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-{tableName}-{id}-collapse"
|
||||
aria-controls="permission-group-{tableName}-{id}-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-icon">
|
||||
<core:iconForRecord table="{tableName}" row="{id: '0'}" />
|
||||
</div>
|
||||
<div class="panel-title">
|
||||
<f:if condition="{table.label}">{f:translate(key:table.label,default:table.label)}</f:if><f:if condition="{showUid}"> <code>[{tableName}]</code></f:if>
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-{tableName}-{id}-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<div class="panel-body">
|
||||
<ul class="panel-list">
|
||||
<f:for each="{table.fields}" as="label" key="field">
|
||||
<li><f:if condition="{label}">{f:translate(key:label,default:label)} </f:if><code>[{field}]</code></li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:for>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="tsconfig">
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-tsconfig-{id}-collapse"
|
||||
aria-controls="permission-group-tsconfig-{id}-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:TSconfig" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-tsconfig-{id}-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<div class="panel-body">
|
||||
<f:render section="userTsConfigTree" arguments="{treeArray: tsconfig}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:section>
|
||||
|
||||
<f:section name="userTsConfigTree">
|
||||
<ul class="treelist">
|
||||
<f:for each="{treeArray}" key="key" as="value">
|
||||
<li>
|
||||
<span class="treelist-group treelist-group-monospace">
|
||||
<span class="treelist-label">{key}</span>
|
||||
<f:if condition="!{beuser:isArray(value: value)}">
|
||||
<span class="treelist-operator">=</span>
|
||||
<span class="treelist-value">{value}</span>
|
||||
</f:if>
|
||||
</span>
|
||||
<f:if condition="{beuser:isArray(value: value)}">
|
||||
<f:render section="userTsConfigTree" arguments="{treeArray: value}" />
|
||||
</f:if>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</f:section>
|
||||
|
||||
<f:section name="pageContentTypes">
|
||||
<f:if condition="{pageContentTypes}">
|
||||
<div class="table-fit">
|
||||
<table class="table">
|
||||
<f:for each="{pageContentTypes}" as="item">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<core:icon identifier="{f:if(condition: item.icon, then: item.icon, else: 'empty-empty')}" />
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<f:if condition="{item.label}">
|
||||
<f:then>
|
||||
{f:translate(key: item.label)}
|
||||
<f:if condition="{showUid}"><code title="{item.longType}">[{item.shortType}]</code></f:if>
|
||||
</f:then>
|
||||
<f:else>
|
||||
{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:notAvailableAbbreviation')}
|
||||
<f:if condition="{showUid}"><code>[{item.longType}]</code></f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,150 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:beuser="http://typo3.org/ns/TYPO3/CMS/Beuser/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<div class="table-fit">
|
||||
<table id="typo3-filemount-list" class="table table-striped table-hover">
|
||||
<colgroup>
|
||||
<col class="col-icon">
|
||||
<col style="width: 20%;">
|
||||
</colgroup>
|
||||
<colgroup>
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col style="width: 20%;">
|
||||
<col class="col-min">
|
||||
<col class="col-control">
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_filemounts.title" /></th>
|
||||
<th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.description" /></th>
|
||||
<th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_file_storage" /></th>
|
||||
<th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_filemounts.identifier" /></th>
|
||||
<th><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:sys_filemounts.read_only" /></th>
|
||||
<th class="col-control"><span class="visually-hidden"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels._CONTROL_" /></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{paginator.paginatedItems}" as="fileMount">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="sys_filemounts"
|
||||
data-contextmenu-uid="{fileMount.uid}"
|
||||
title="{f:if(condition: '{fileMount.description}', then: '{fileMount.description} (id={fileMount.uid})', else: 'id={fileMount.uid}')}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<beuser:spriteIconForRecord table="sys_filemounts" object="{fileMount}" />
|
||||
</button>
|
||||
</td>
|
||||
<td>
|
||||
<backend:link.editRecord table="sys_filemounts" uid="{fileMount.uid}" title="{f:translate(key:'btn.edit')}">
|
||||
{fileMount.title}
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
<td>{fileMount.description}</td>
|
||||
<td>
|
||||
<a
|
||||
href="{backend:moduleLink(route: 'media_management', query: 'id={fileMount.storage.uid}:/')}'"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemount.link.openInFilelist')}"
|
||||
>
|
||||
{fileMount.storage.name}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<a
|
||||
href="{backend:moduleLink(route: 'media_management', query: 'id={fileMount.storage.uid}:{fileMount.path}')}'"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemount.link.openInFilelist')}"
|
||||
>
|
||||
{fileMount.storage.configuration.basePath}{fileMount.path}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<f:if condition="{fileMount.readOnly} == true">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:yes" />
|
||||
</f:if>
|
||||
</td>
|
||||
<td class="col-control">
|
||||
<div class="btn-group" role="group">
|
||||
<backend:link.editRecord class="btn btn-default" table="sys_filemounts" uid="{fileMount.uid}" title="{f:translate(key:'btn.edit')}">
|
||||
<core:icon identifier="actions-open" />
|
||||
</backend:link.editRecord>
|
||||
<f:if condition="{fileMount.hidden} == true">
|
||||
<f:then>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="{backend:moduleLink(route:'tce_db', query:'data[sys_filemounts][{fileMount.uid}][hidden]=0', currentUrlParameterName:'redirect')}"
|
||||
title="{f:translate(key:'btn.enable')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-toggle-off" />
|
||||
</a>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="{backend:moduleLink(route:'tce_db', query:'data[sys_filemounts][{fileMount.uid}][hidden]=1', currentUrlParameterName:'redirect')}"
|
||||
title="{f:translate(key:'btn.disable')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-toggle-on" />
|
||||
</a>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<a
|
||||
class="btn btn-default t3js-modal-trigger"
|
||||
href="{backend:moduleLink(route:'tce_db', query:'cmd[sys_filemounts][{fileMount.uid}][delete]=1', currentUrlParameterName:'redirect')}"
|
||||
title="{f:translate(key:'btn.delete')}"
|
||||
data-severity="warning"
|
||||
data-title="{f:translate(key:'LLL:EXT:backend/Resources/Private/Language/locallang_alt_doc.xlf:label.confirm.delete_record.title')}"
|
||||
data-content="{f:translate(key:'filemount.confirm.deletion',arguments:'{0:fileMount.title}')}"
|
||||
data-button-close-text="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-delete" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="btn-group" role="group">
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="#"
|
||||
title="{f:translate(key:'btn.info')}"
|
||||
data-dispatch-action="TYPO3.InfoWindow.showItem"
|
||||
data-dispatch-args-list="sys_filemounts,{fileMount.uid}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-info" />
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="7">
|
||||
<f:if condition="{totalAmountOfFilemounts} > 1" >
|
||||
<f:then>
|
||||
{totalAmountOfFilemounts} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemount.amount.multiple" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
{totalAmountOfFilemounts} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemount.amount.singular" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<f:render partial="SimplePagination" arguments="{paginator:paginator, pagination:pagination, actionName:'filemounts'}" />
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
<html
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<span id="g_{pageId}">
|
||||
<button
|
||||
type="button"
|
||||
class="ug_selector changegroup btn btn-sm btn-link"
|
||||
data-page="{pageId}"
|
||||
data-group-id="{groupId}"
|
||||
data-groupname="{groupname}"
|
||||
title="{groupname}"
|
||||
>
|
||||
<f:if condition="{groupId} == 0">
|
||||
<f:then>
|
||||
<f:comment>
|
||||
No group set -> [not set]
|
||||
</f:comment>
|
||||
[<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:notSet" />]
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{groupname}">
|
||||
<f:then>
|
||||
<f:comment>
|
||||
A group name can be resolved
|
||||
</f:comment>
|
||||
{groupname}
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:comment>
|
||||
Group was deleted -> [deleted]
|
||||
</f:comment>
|
||||
[<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:deleted" />]
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</button>
|
||||
</span>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,42 @@
|
||||
<html
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<span id="o_{pageId}">
|
||||
<button
|
||||
type="button"
|
||||
class="ug_selector changeowner btn btn-sm btn-link"
|
||||
data-page="{pageId}"
|
||||
data-owner="{userId}"
|
||||
data-username="{username}"
|
||||
title="{username}"
|
||||
>
|
||||
<f:if condition="{userId} == 0">
|
||||
<f:then>
|
||||
<f:comment>
|
||||
No owner set -> [not set]
|
||||
</f:comment>
|
||||
[<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:notSet" />]
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{username}">
|
||||
<f:then>
|
||||
<f:comment>
|
||||
A user name can be resolved
|
||||
</f:comment>
|
||||
{username}
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:comment>
|
||||
User was deleted -> [deleted]
|
||||
</f:comment>
|
||||
[<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:deleted" />]
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</button>
|
||||
</span>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,99 @@
|
||||
<html
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:if condition="{paginator.numberOfPages} > 1">
|
||||
<nav class="pagination-wrap">
|
||||
<ul class="pagination">
|
||||
<f:if condition="{pagination.previousPageNumber} && {pagination.previousPageNumber} >= {pagination.firstPageNumber}">
|
||||
<f:then>
|
||||
<li class="page-item">
|
||||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: 1})}" title="{f:translate(key:'pagination.first')}" class="page-link">
|
||||
<core:icon identifier="actions-view-paging-first" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.previousPageNumber})}" title="{f:translate(key:'pagination.previous')}" class="page-link">
|
||||
<core:icon identifier="actions-view-paging-previous" />
|
||||
</a>
|
||||
</li>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link">
|
||||
<core:icon identifier="empty-empty"/>
|
||||
</span>
|
||||
</li>
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link">
|
||||
<core:icon identifier="empty-empty"/>
|
||||
</span>
|
||||
</li>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<li class="page-item">
|
||||
<span class="page-link">
|
||||
<f:translate key="pagination.records" /> {pagination.startRecordNumber} - {pagination.endRecordNumber}
|
||||
</span>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<span class="page-link">
|
||||
<f:translate key="pagination.page" />
|
||||
<form class="form-inline"
|
||||
data-global-event="submit"
|
||||
data-action-navigate="$form=~s/$value/"
|
||||
data-navigate-value="{f:uri.action(action:actionName, arguments:'{currentPage: \'$[value]\'}')}"
|
||||
data-value-selector="input[name='paginator-target-page']">
|
||||
<input
|
||||
min="{pagination.firstPageNumber}"
|
||||
max="{pagination.lastPageNumber}"
|
||||
data-number-of-pages="{paginator.numberOfPages}"
|
||||
name="paginator-target-page"
|
||||
class="form-control form-control-sm paginator-input"
|
||||
size="5"
|
||||
value="{paginator.currentPageNumber}"
|
||||
type="number"
|
||||
/>
|
||||
</form>
|
||||
/ {pagination.lastPageNumber}
|
||||
</span>
|
||||
</li>
|
||||
|
||||
<f:if condition="{pagination.nextPageNumber} && {pagination.nextPageNumber} <= {pagination.lastPageNumber}">
|
||||
<f:then>
|
||||
<li class="page-item">
|
||||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.nextPageNumber})}" title="{f:translate(key:'pagination.next')}" class="page-link">
|
||||
<core:icon identifier="actions-view-paging-next" />
|
||||
</a>
|
||||
</li>
|
||||
<li class="page-item">
|
||||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: pagination.lastPageNumber})}" title="{f:translate(key:'pagination.last')}" class="page-link">
|
||||
<core:icon identifier="actions-view-paging-last" />
|
||||
</a>
|
||||
</li>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link">
|
||||
<core:icon identifier="empty-empty"/>
|
||||
</span>
|
||||
</li>
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link">
|
||||
<core:icon identifier="empty-empty"/>
|
||||
</span>
|
||||
</li>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<li class="page-item">
|
||||
<a href="{f:uri.action(action:actionName, arguments:{currentPage: paginator.currentPageNumber})}" title="{f:translate(key:'pagination.refresh')}" class="page-link">
|
||||
<core:icon identifier="actions-refresh" />
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
</f:if>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,290 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module" />
|
||||
|
||||
<f:section name="Before">
|
||||
<f:asset.module identifier="@typo3/backend/element/immediate-action-element.js"/>
|
||||
<f:asset.module identifier="@typo3/backend/utility/collapse-state-persister.js"/>
|
||||
<f:variable name="args" value="{0: 'system', 1: '0'}" />
|
||||
<typo3-immediate-action
|
||||
action="TYPO3.Backend.Storage.ModuleStateStorage.update"
|
||||
args="{args -> f:format.json() -> f:format.htmlspecialchars()}"
|
||||
></typo3-immediate-action>
|
||||
</f:section>
|
||||
|
||||
<f:section name="Content">
|
||||
|
||||
<h1><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.compare.title" /></h1>
|
||||
|
||||
<f:variable name="comparedUserAmount" value="{compareUserList -> f:count()}" />
|
||||
<div class="table-fit">
|
||||
<table class="table table-striped-columns table-bordered table-vertical-top beuser-comparison-table">
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<f:for each="{compareUserList}" as="tmpColumn">
|
||||
<col style="width: calc(85% / {comparedUserAmount})">
|
||||
</f:for>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<th scope="col">
|
||||
<div class="beuser-comparison-element">
|
||||
<div class="beuser-comparison-element__title">
|
||||
<span title="id={compareData.user.uid}">
|
||||
<core:iconForRecord table="be_users" row="{compareData.user}"/>
|
||||
</span>
|
||||
<span>{compareData.user.username}<f:if condition="{showUid}" > <code>[{compareData.user.uid}]</code></f:if></span>
|
||||
</div>
|
||||
<div class="beuser-comparison-element__action">
|
||||
<backend:link.editRecord
|
||||
table="be_users"
|
||||
uid="{compareData.user.uid}"
|
||||
class="btn btn-default btn-sm"
|
||||
title="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.edit')}"
|
||||
>
|
||||
<core:icon identifier="actions-open" />
|
||||
</backend:link.editRecord>
|
||||
|
||||
<f:form.button
|
||||
form="form-remove-from-compare-list"
|
||||
name="uid"
|
||||
value="{compareData.user.uid}"
|
||||
type="submit"
|
||||
class="btn btn-default btn-sm"
|
||||
title="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.removeFromCompareList')}"
|
||||
>
|
||||
<core:icon identifier="actions-minus" size="small" />
|
||||
</f:form.button>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
</f:for>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:admin" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:if condition="{compareData.user.admin}">
|
||||
<f:then>
|
||||
<span class="text-success"><core:icon identifier="actions-check" size="small" /></span>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:yes" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<span class="text-danger"><core:icon identifier="actions-close" size="small" /></span>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:no" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{showUid}"> <code>[{compareData.user.admin}]</code></f:if>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:name" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>{compareData.user.realName}</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:email" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
{compareData.user.email}
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:avatar" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<backend:avatar backendUser="{compareData.user.uid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:disable" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:if condition="{compareData.user.disable}">
|
||||
<f:then>
|
||||
<span class="text-danger"><core:icon identifier="actions-close" size="small" /></span>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:no" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<span class="text-success"><core:icon identifier="actions-check" size="small" /></span>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:yes" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:if condition="{showUid}"> <code>[{compareData.user.disable}]</code></f:if>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:startDateAndTime" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:if condition="{compareData.user.starttime}">
|
||||
<f:format.date format="{dateFormat} {timeFormat}">{compareData.user.starttime}</f:format.date>
|
||||
</f:if>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:endDateAndTime" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:if condition="{compareData.user.endtime}">
|
||||
<f:format.date format="{dateFormat} {timeFormat}">{compareData.user.endtime}</f:format.date>
|
||||
</f:if>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:lastLogin" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:if condition="{compareData.user.lastlogin}">
|
||||
<f:then>
|
||||
<f:format.date format="{dateFormat} {timeFormat}">{compareData.user.lastlogin}</f:format.date>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:never" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.description" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
{compareData.user.description -> f:format.nl2br()}
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.subgroup" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="groups" arguments="{groups: compareData.groups, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedLanguages" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="languages" arguments="{languages: compareData.languages, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.pagetypes_select" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="pageTypes" arguments="{pageTypes: compareData.pageTypes, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedPageContentTypes" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:if condition="{compareData.pageContentTypes}">
|
||||
<f:render partial="Compare/Information" section="pageContentTypes" arguments="{pageContentTypes: compareData.pageContentTypes, showUid: showUid}" />
|
||||
</f:if>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.non_exclude_fields" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="nonExcludeFields"
|
||||
arguments="{
|
||||
nonExcludeFields: compareData.non_exclude_fields,
|
||||
id: compareData.user.uid,
|
||||
showUid: showUid
|
||||
}"
|
||||
/>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="workspaces" arguments="{workspaces: compareData.workspaces, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:pageTreeEntryPoints" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="dbMounts" arguments="{dbMounts: compareData.dbMounts, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:fileMounts" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="fileMounts" arguments="{fileMounts: compareData.fileMounts, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.fileoper_perms" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="fileFolderPermissions" arguments="{fileFolderPermissions: compareData.fileFolderPermissions, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:category_perms" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="categories" arguments="{categories: compareData.categories, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:options" /></th>
|
||||
<f:for each="{compareUserList}" as="compareData">
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{compareData.tsconfig}">
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="tsconfig"
|
||||
arguments="{
|
||||
tsconfig: compareData.tsconfig,
|
||||
id:compareData.user.uid,
|
||||
showUid: showUid
|
||||
}"
|
||||
/>
|
||||
</f:if>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<f:form action="removeFromCompareList" method="post" id="form-remove-from-compare-list" class="hidden">
|
||||
<f:form.hidden name="redirectToCompare" value="1"/>
|
||||
</f:form>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,116 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module" />
|
||||
<f:section name="Content">
|
||||
|
||||
<h1><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.title" /></h1>
|
||||
|
||||
<f:if condition="{compareUserList}">
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.section.compare" /></h2>
|
||||
<div class="table-fit">
|
||||
<table id="typo3-backend-user-list-compare" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<th colspan="3"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:userName" /> / <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:realName" /></th>
|
||||
<th class="col-control"><span class="visually-hidden"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels._CONTROL_" /></span></th>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{compareUserList}" as="compareUser">
|
||||
<tr>
|
||||
<td class="col-indicator">
|
||||
<f:if condition="{onlineBackendUsers.{compareUser.uid}}">
|
||||
<typo3-backend-status-indicator state="success" live label="{f:translate(key:'backendUser.list.label.online', domain:'beuser.messages')}"></typo3-backend-status-indicator>
|
||||
</f:if>
|
||||
</td>
|
||||
<td class="col-avatar">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="be_users"
|
||||
data-contextmenu-uid="{compareUser.uid}"
|
||||
title="{f:if(condition: '{compareUser.description}', then: '{compareUser.description} (id={compareUser.uid})', else: 'id={compareUser.uid}')}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<backend:avatar backendUser="{compareUser.uid}" showIcon="true" />
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<backend:link.editRecord
|
||||
table="be_users"
|
||||
uid="{compareUser.uid}"
|
||||
title="{f:translate(key:'btn.edit')}"
|
||||
>
|
||||
<f:if condition="{compareUser.realName}">
|
||||
<f:then>
|
||||
{compareUser.realName}
|
||||
<br>
|
||||
<span class="text-variant">({compareUser.username})</span>
|
||||
</f:then>
|
||||
<f:else>
|
||||
{compareUser.username}
|
||||
</f:else>
|
||||
</f:if>
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
<td class="col-control">
|
||||
<backend:link.editRecord
|
||||
class="btn btn-default"
|
||||
table="be_users"
|
||||
uid="{compareUser.uid}"
|
||||
title="{f:translate(key:'btn.edit')}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-open" />
|
||||
</backend:link.editRecord>
|
||||
<f:form.button
|
||||
form="form-remove-from-compare-list"
|
||||
name="uid"
|
||||
value="{compareUser.uid}"
|
||||
type="submit"
|
||||
class="btn btn-default"
|
||||
title="{f:translate(key: 'btn.removeFromCompareList')}"
|
||||
>
|
||||
<core:icon identifier="actions-minus" />
|
||||
</f:form.button>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="4">
|
||||
<f:if condition="{compareUserList -> f:count()} > 1">
|
||||
<f:then>{compareUserList -> f:count()} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:users" /></f:then>
|
||||
<f:else>{compareUserList -> f:count()} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:user" /></f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<f:link.action action="compare" class="btn btn-default t3js-acceptance-compare">
|
||||
<core:icon identifier="actions-code-compare" />
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.btn.compareList" />
|
||||
</f:link.action>
|
||||
<f:form.button type="submit" class="btn btn-default" form="form-remove-all-from-compare-list">
|
||||
<core:icon identifier="actions-selection-delete" />
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.clearCompareList" />
|
||||
</f:form.button>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.list.section.allUsers" /></h2>
|
||||
</f:if>
|
||||
<f:render partial="BackendUser/Filter" arguments="{demand: demand, backendUserGroups: backendUserGroups}" />
|
||||
<f:render partial="BackendUser/PaginatedList" arguments="{_all}" />
|
||||
|
||||
<f:form action="initiatePasswordReset" method="post" id="form-initiate-password-reset" class="hidden"/>
|
||||
<f:form action="removeFromCompareList" method="post" id="form-remove-from-compare-list" class="hidden"/>
|
||||
<f:form action="addToCompareList" method="post" id="form-add-to-compare-list" class="hidden"/>
|
||||
<f:form action="removeAllFromCompareList" method="post" id="form-remove-all-from-compare-list" class="hidden"/>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,119 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:beuser="http://typo3.org/ns/TYPO3/CMS/Beuser/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module" />
|
||||
<f:section name="Content">
|
||||
|
||||
<h1><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.online.title" /></h1>
|
||||
<div class="table-fit">
|
||||
<table class="table beuser-online-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:userName" /> / <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:realName" /></th>
|
||||
<th class="col-50"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.online.table.column.ipAddress" /></th>
|
||||
<th class="col-datetime"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.online.table.column.lastAccess" /></th>
|
||||
<th class="col-control"><span class="visually-hidden"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels._CONTROL_" /></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<f:for each="{onlineUsersAndSessions}" as="onlineUser">
|
||||
<tbody>
|
||||
<f:for each="{onlineUser.sessions}" as="session" iteration="backendUserIterator">
|
||||
<f:variable name="sessionAmount" value="{onlineUser.sessions -> f:count()}" />
|
||||
<tr{f:if(condition: '({sessionAmount} > 1) && !{backendUserIterator.isFirst}', then: ' class="beuser-online-table_row"')}>
|
||||
<f:if condition="{backendUserIterator.isFirst}">
|
||||
<f:then>
|
||||
<td {f:if(condition: '{sessionAmount} > 1', then: 'rowspan="{sessionAmount}" class="col-avatar align-top"', else: 'class="col-avatar"')}>
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="be_users"
|
||||
data-contextmenu-uid="{onlineUser.backendUser.uid}"
|
||||
title="{f:if(condition: '{onlineUser.backendUser.description}', then: '{onlineUser.backendUser.description} (id={onlineUser.backendUser.uid})', else: 'id={onlineUser.backendUser.uid}')}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<backend:avatar backendUser="{onlineUser.backendUser.uid}" showIcon="true" />
|
||||
</button>
|
||||
</td>
|
||||
<td {f:if(condition: '{sessionAmount} > 1', then: 'rowspan="{sessionAmount}" class="col-min align-top border-end"', else: 'class="col-min"')}>
|
||||
<backend:link.editRecord table="be_users" uid="{onlineUser.backendUser.uid}" title="{f:translate(key:'btn.edit')}">
|
||||
<f:if condition="{onlineUser.backendUser.realName}">
|
||||
<f:then>
|
||||
{onlineUser.backendUser.realName}
|
||||
<beuser:mfaStatus userUid="{onlineUser.backendUser.uid}"/><br>
|
||||
<span class="text-variant">({onlineUser.backendUser.userName})</span>
|
||||
</f:then>
|
||||
<f:else>
|
||||
{onlineUser.backendUser.userName}
|
||||
<beuser:mfaStatus userUid="{onlineUser.backendUser.uid}"/>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
</f:then>
|
||||
</f:if>
|
||||
<td class="col-50">{session.ip}</td>
|
||||
<td class="col-datetime">
|
||||
<f:format.date format="{dateFormat} {timeFormat}" date="{session.timestamp}" />
|
||||
<f:if condition="{currentSessionId} == {session.id}">
|
||||
<span class="badge badge-notice"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.online.activeSession" /></span>
|
||||
</f:if>
|
||||
</td>
|
||||
<td class="col-control">
|
||||
<f:if condition="{currentSessionId} == {session.id}">
|
||||
<f:else>
|
||||
<f:form.button
|
||||
name="sessionId"
|
||||
value="{session.id}"
|
||||
form="form-terminate-backend-user-session"
|
||||
class="btn btn-default t3js-modal-trigger"
|
||||
title="{f:translate(key: 'resetPassword.label')}"
|
||||
type="submit"
|
||||
data-severity="warning"
|
||||
data-title="{f:translate(key: 'backendUser.online.endSession')}"
|
||||
data-content="{f:translate(key: 'backendUser.online.reallyLogout')} {onlineUser.backendUser.userName}?"
|
||||
data-button-close-text="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
|
||||
>
|
||||
<core:icon identifier="actions-close" />
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.online.endSession" />
|
||||
</f:form.button>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<a
|
||||
class="btn btn-default"
|
||||
href="#"
|
||||
data-dispatch-action="TYPO3.InfoWindow.showItem"
|
||||
data-dispatch-args-list="be_users,{onlineUser.backendUser.uid}"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-document-info" />
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
</f:for>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="5">
|
||||
<f:variable name="onlineUsersAndSessionsCount">{onlineUsersAndSessions -> f:count()}</f:variable>
|
||||
<f:if condition="{onlineUsersAndSessionsCount} > 1">
|
||||
<f:then>{onlineUsersAndSessionsCount} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:users" /></f:then>
|
||||
<f:else>{onlineUsersAndSessionsCount} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:user" /></f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<f:form id="form-terminate-backend-user-session" action="terminateBackendUserSession" controller="BackendUser" method="post"class="hidden" />
|
||||
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,578 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module"/>
|
||||
|
||||
<f:section name="Before">
|
||||
<f:asset.module identifier="@typo3/backend/element/immediate-action-element.js"/>
|
||||
<f:asset.module identifier="@typo3/backend/utility/collapse-state-persister.js"/>
|
||||
<f:variable name="args" value="{0: 'system', 1: data.user.uid}" />
|
||||
<typo3-immediate-action
|
||||
action="TYPO3.Backend.Storage.ModuleStateStorage.update"
|
||||
args="{args -> f:format.json() -> f:format.htmlspecialchars()}"
|
||||
></typo3-immediate-action>
|
||||
</f:section>
|
||||
|
||||
<f:section name="Content">
|
||||
|
||||
<h1>
|
||||
<f:translate
|
||||
key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.title"
|
||||
arguments="{
|
||||
0: '{data.user.username}'
|
||||
}"
|
||||
/>
|
||||
</h1>
|
||||
|
||||
<f:be.infobox
|
||||
title="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.infobox.title')}"
|
||||
message="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.infobox.message')}"
|
||||
state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"
|
||||
/>
|
||||
|
||||
<div class="table-fit">
|
||||
<table class="table table-striped table-hover table-vertical-top">
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:admin" /></th>
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{data.user.admin}">
|
||||
<f:then>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:yes" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:no" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:userName" /></th>
|
||||
<td class="col-word-break">
|
||||
{data.user.username}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:name" /></th>
|
||||
<td class="col-word-break">
|
||||
{data.user.realName}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:email" /></th>
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{data.user.email}">
|
||||
<f:link.email email="{data.user.email}"/>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:avatar" /></th>
|
||||
<td class="col-word-break">
|
||||
<backend:avatar backendUser="{data.user.uid}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:disable" /></th>
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{data.user.disable}">
|
||||
<f:then>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:no" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:yes" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:startDateAndTime" /></th>
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{data.user.starttime}">
|
||||
<f:format.date format="{dateFormat} {timeFormat}">{data.user.starttime}</f:format.date>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:endDateAndTime" /></th>
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{data.user.endtime}">
|
||||
<f:format.date format="{dateFormat} {timeFormat}">{data.user.endtime}</f:format.date>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:lastLogin" /></th>
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{data.user.lastlogin}">
|
||||
<f:then>
|
||||
<f:format.date format="{dateFormat} {timeFormat}">{data.user.lastlogin}</f:format.date>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:never" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.description" /></th>
|
||||
<td class="col-word-break">
|
||||
{data.user.description -> f:format.nl2br()}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:groups" /></h2>
|
||||
<f:if condition="{data.groups.all}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-groups-collapse"
|
||||
aria-controls="permission-group-groups-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.subgroup" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-groups-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="groups"
|
||||
arguments="{
|
||||
groups: data.groups,
|
||||
hasColumnClasses: 1
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.subgroup" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:languages" /></h2>
|
||||
<f:if condition="{data.languages}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-languages-collapse"
|
||||
aria-controls="permission-group-languages-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedLanguages" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-languages-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="languages" arguments="{languages: data.languages}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedLanguages" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:permissions" /></h2>
|
||||
<h3><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:generalPermissions" /></h3>
|
||||
<f:if condition="{data.modules}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-modules-collapse"
|
||||
aria-controls="permission-group-modules-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:userMods" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-modules-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="modules" arguments="{modules: data.modules}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:userMods" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.pageTypes}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-pageType-collapse"
|
||||
aria-controls="permission-group-pageType-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.pagetypes_select" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-pageType-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="pageTypes" arguments="{pageTypes: data.pageTypes}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.pagetypes_select" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.pageContentTypes}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-pageContentTypes-collapse"
|
||||
aria-controls="permission-group-pageContentTypes-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedPageContentTypes" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-pageContentTypes-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="pageContentTypes" arguments="{pageContentTypes: data.pageContentTypes}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedPageContentTypes" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.tables.all}">
|
||||
<f:then>
|
||||
<h3 class="headline-spaced"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compare.tables" /></h3>
|
||||
<f:render partial="Compare/Information" section="tables" arguments="{tables: data.tables}" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compare.tables" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.non_exclude_fields}">
|
||||
<f:then>
|
||||
<h3 class="headline-spaced"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.non_exclude_fields" /></h3>
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="nonExcludeFields"
|
||||
arguments="{
|
||||
nonExcludeFields: data.non_exclude_fields,
|
||||
id: data.user.uid
|
||||
}"
|
||||
/>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.non_exclude_fields" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:mountsWorkspaces" /></h2>
|
||||
<f:if condition="{data.workspaces} && {data.workspaces.record.uid}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-workspaces-collapse"
|
||||
aria-controls="permission-group-workspaces-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-workspaces-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="workspaces" arguments="{workspaces: data.workspaces}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.dbMounts}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-dbMounts-collapse"
|
||||
aria-controls="permission-group-dbMounts-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:pageTreeEntryPoints" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-dbMounts-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="dbMounts" arguments="{dbMounts: data.dbMounts}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:pageTreeEntryPoints" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.fileMounts}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-fileMounts-collapse"
|
||||
aria-controls="permission-group-fileMounts-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:fileMounts" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-fileMounts-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="fileMounts" arguments="{fileMounts: data.fileMounts}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:fileMounts" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.fileFolderPermissions}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-fileFolderPermissions-collapse"
|
||||
aria-controls="permission-group-fileFolderPermissions-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.fileoper_perms" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-fileFolderPermissions-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="fileFolderPermissions" arguments="{fileFolderPermissions: data.fileFolderPermissions}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.fileoper_perms" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.categories}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-categories-collapse"
|
||||
aria-controls="permission-group-categories-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:category_perms" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-categories-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="categories" arguments="{categories: data.categories}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:category_perms" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:options" /></h2>
|
||||
<f:if condition="{data.tsconfig}">
|
||||
<f:then>
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="tsconfig"
|
||||
arguments="{
|
||||
tsconfig: data.tsconfig,
|
||||
id: data.user.uid
|
||||
}"
|
||||
/>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:TSconfig" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,217 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module" />
|
||||
|
||||
<f:section name="Before">
|
||||
<f:asset.module identifier="@typo3/backend/element/immediate-action-element.js"/>
|
||||
<f:asset.module identifier="@typo3/backend/utility/collapse-state-persister.js"/>
|
||||
<f:variable name="args" value="{0: 'system', 1: '0'}" />
|
||||
<typo3-immediate-action
|
||||
action="TYPO3.Backend.Storage.ModuleStateStorage.update"
|
||||
args="{args -> f:format.json() -> f:format.htmlspecialchars()}"
|
||||
></typo3-immediate-action>
|
||||
</f:section>
|
||||
|
||||
<f:section name="Content">
|
||||
|
||||
<h1><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.compare.title" /></h1>
|
||||
|
||||
<f:variable name="comparedUserGroupAmount" value="{compareGroupList -> f:count()}" />
|
||||
<div class="table-fit">
|
||||
<table class="table table-striped-columns table-bordered table-vertical-top beuser-comparison-table">
|
||||
<colgroup>
|
||||
<col style="width: 15%;">
|
||||
<f:for each="{compareGroupList}" as="tmpColumn">
|
||||
<col style="width: calc(85% / {comparedUserGroupAmount})">
|
||||
</f:for>
|
||||
</colgroup>
|
||||
<thead>
|
||||
<tr>
|
||||
<td></td>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<th scope="col">
|
||||
<div class="beuser-comparison-element">
|
||||
<div class="beuser-comparison-element__title">
|
||||
<span title="id={compareData.group.uid}">
|
||||
<core:iconForRecord table="be_groups" row="{compareData.group}"/>
|
||||
</span>
|
||||
<span>{compareData.group.title}<f:if condition="{showUid}"> <code>[{compareData.group.uid}]</code></f:if></span>
|
||||
</div>
|
||||
<div class="beuser-comparison-element__action">
|
||||
<backend:link.editRecord
|
||||
table="be_groups"
|
||||
uid="{compareData.group.uid}"
|
||||
class="btn btn-default btn-sm"
|
||||
title="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.edit')}"
|
||||
>
|
||||
<core:icon identifier="actions-open" />
|
||||
</backend:link.editRecord>
|
||||
<f:form.button
|
||||
form="form-remove-group-from-compare-list"
|
||||
name="uid"
|
||||
value="{compareData.group.uid}"
|
||||
type="submit"
|
||||
class="btn btn-default btn-sm"
|
||||
title="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.removeFromCompareList')}"
|
||||
>
|
||||
<core:icon identifier="actions-minus" size="small" />
|
||||
</f:form.button>
|
||||
</div>
|
||||
</div>
|
||||
</th>
|
||||
</f:for>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.description" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
{compareData.group.description -> f:format.nl2br()}
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.subgroup" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="groups" arguments="{groups: compareData.groups, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedLanguages" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="languages" arguments="{languages: compareData.languages, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:userMods" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="modules" arguments="{modules: compareData.modules, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.pagetypes_select" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="pageTypes" arguments="{pageTypes: compareData.pageTypes, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compare.tables" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="tables"
|
||||
arguments="{
|
||||
tables: compareData.tables,
|
||||
id:compareData.group.uid,
|
||||
showUid: showUid
|
||||
}"
|
||||
/>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedPageContentTypes" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="pageContentTypes" arguments="{pageContentTypes: compareData.pageContentTypes, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.non_exclude_fields" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="nonExcludeFields"
|
||||
arguments="{
|
||||
nonExcludeFields: compareData.non_exclude_fields,
|
||||
id: compareData.group.uid,
|
||||
showUid: showUid
|
||||
}"
|
||||
/>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="workspaces" arguments="{workspaces: compareData.workspaces}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:pageTreeEntryPoints" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="dbMounts" arguments="{dbMounts: compareData.dbMounts, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:fileMounts" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="fileMounts" arguments="{fileMounts: compareData.fileMounts, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.fileoper_perms" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="fileFolderPermissions" arguments="{fileFolderPermissions: compareData.fileFolderPermissions, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:category_perms" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td>
|
||||
<f:render partial="Compare/Information" section="categories" arguments="{categories: compareData.categories, showUid: showUid}" />
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:options" /></th>
|
||||
<f:for each="{compareGroupList}" as="compareData">
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{compareData.tsconfig}">
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="tsconfig"
|
||||
arguments="{
|
||||
tsconfig: compareData.tsconfig,
|
||||
id:compareData.group.uid
|
||||
}"
|
||||
/>
|
||||
</f:if>
|
||||
</td>
|
||||
</f:for>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<f:form action="removeGroupFromCompareList" method="post" id="form-remove-group-from-compare-list" class="hidden">
|
||||
<f:form.hidden name="redirectToCompare" value="1"/>
|
||||
</f:form>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,114 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module" />
|
||||
<f:section name="Content">
|
||||
|
||||
<h1><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.list.title" /></h1>
|
||||
<f:if condition="{totalAmountOfBackendUserGroups} > 0">
|
||||
<f:then>
|
||||
<f:if condition="{compareGroupList}">
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.list.section.compare" /></h2>
|
||||
<div class="table-fit">
|
||||
<table id="typo3-backend-user-list-compare" class="table table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="2"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.list.table.column.groupTitle" /></th>
|
||||
<th class="col-control"><span class="visually-hidden"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels._CONTROL_" /></span></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{compareGroupList}" as="compareGroup">
|
||||
<tr>
|
||||
<td class="col-icon">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="be_groups"
|
||||
data-contextmenu-uid="{compareGroup.uid}"
|
||||
title="{f:if(condition: '{compareGroup.description}', then: '{compareGroup.description} (id={compareGroup.uid})', else: 'id={compareGroup.uid}')}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<core:iconForRecord table="be_groups" row="{compareGroup}"/>
|
||||
</button>
|
||||
</td>
|
||||
<td class="col-title">
|
||||
<backend:link.editRecord
|
||||
table="be_groups"
|
||||
uid="{compareGroup.uid}"
|
||||
title="{f:translate(key:'btn.edit')}"
|
||||
>
|
||||
{compareGroup.title}
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
<td class="col-control">
|
||||
<backend:link.editRecord
|
||||
class="btn btn-default"
|
||||
table="be_groups"
|
||||
uid="{compareGroup.uid}"
|
||||
title="{f:translate(key:'btn.edit')}"
|
||||
>
|
||||
<core:icon identifier="actions-open" />
|
||||
</backend:link.editRecord>
|
||||
<f:form.button
|
||||
form="form-remove-group-from-compare-list"
|
||||
name="uid"
|
||||
value="{compareGroup.uid}"
|
||||
type="submit"
|
||||
class="btn btn-default"
|
||||
title="{f:translate(key: 'btn.removeFromCompareList')}"
|
||||
>
|
||||
<core:icon identifier="actions-minus" />
|
||||
</f:form.button>
|
||||
</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="3">
|
||||
<f:if condition="{compareGroupList -> f:count()} > 1">
|
||||
<f:then>{compareGroupList -> f:count()} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:groups" /></f:then>
|
||||
<f:else>{compareGroupList -> f:count()} <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:group" /></f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
<f:link.action action="compareGroups" class="btn btn-default t3js-acceptance-compare">
|
||||
<core:icon identifier="actions-code-compare" />
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.list.btn.compareList" />
|
||||
</f:link.action>
|
||||
<f:form.button type="submit" class="btn btn-default" form="form-remove-all-groups-from-compare-list">
|
||||
<core:icon identifier="actions-selection-delete" />
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.clearCompareList" />
|
||||
</f:form.button>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.list.section.allUserGroups" /></h2>
|
||||
</f:if>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:be.infobox state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}" title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.noGroupsFound.title')}">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.noGroupsFound.message"/></p>
|
||||
<backend:link.newRecord returnUrl="{returnUrl}" class="btn btn-primary" table="be_groups">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.backendUserGroup.create"/>
|
||||
</backend:link.newRecord>
|
||||
</f:be.infobox>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:render partial="BackendUserGroup/Filter" arguments="{userGroupDto: userGroupDto, backendUserGroups: backendUserGroups}" />
|
||||
<f:render partial="BackendUserGroup/PaginatedList" arguments="{_all}" />
|
||||
|
||||
<f:form action="removeGroupFromCompareList" method="post" id="form-remove-group-from-compare-list" class="hidden"/>
|
||||
<f:form action="addGroupToCompareList" method="post" id="form-add-group-to-compare-list" class="hidden"/>
|
||||
<f:form action="removeAllGroupsFromCompareList" method="post" id="form-remove-all-groups-from-compare-list" class="hidden"/>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,545 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module"/>
|
||||
|
||||
<f:section name="Before">
|
||||
<f:asset.module identifier="@typo3/backend/element/immediate-action-element.js"/>
|
||||
<f:asset.module identifier="@typo3/backend/utility/collapse-state-persister.js"/>
|
||||
<f:variable name="args" value="{0: 'system', 1: '0'}" />
|
||||
<typo3-immediate-action
|
||||
action="TYPO3.Backend.Storage.ModuleStateStorage.update"
|
||||
args="{args -> f:format.json() -> f:format.htmlspecialchars()}"
|
||||
></typo3-immediate-action>
|
||||
</f:section>
|
||||
|
||||
<f:section name="Content">
|
||||
<h1>
|
||||
<f:translate
|
||||
key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.show.title"
|
||||
arguments="{
|
||||
0: '{data.group.title}'
|
||||
}"
|
||||
/>
|
||||
</h1>
|
||||
|
||||
<f:be.infobox
|
||||
title="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.show.infobox.title')}"
|
||||
message="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUserGroup.show.infobox.message')}"
|
||||
state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"
|
||||
/>
|
||||
|
||||
<div class="table-fit">
|
||||
<table class="table table-striped table-hover table-vertical-top">
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.title" /></th>
|
||||
<td class="col-word-break">
|
||||
{data.group.title}
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:disable" /></th>
|
||||
<td class="col-word-break">
|
||||
<f:if condition="{data.group.hidden}">
|
||||
<f:then>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:no" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:yes" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class="col-fieldname"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_general.xlf:LGL.description" /></th>
|
||||
<td class="col-word-break">
|
||||
{data.group.description -> f:format.nl2br()}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:inheritance" /></h2>
|
||||
<f:if condition="{data.groups.diff}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-groups-collapse"
|
||||
aria-controls="permission-group-groups-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.subgroup" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-groups-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<div class="table-fit">
|
||||
<table class="table table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:information.groups.table.column.groupTitle" />
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{data.groups.all}" as="group">
|
||||
<f:if condition="{group.diff}">
|
||||
<tr>
|
||||
<td class="col-title col-responsive">
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-link"
|
||||
data-contextmenu-trigger="click"
|
||||
data-contextmenu-table="be_groups"
|
||||
data-contextmenu-uid="{group.row.uid}"
|
||||
title="id={group.row.uid}"
|
||||
aria-label="{f:translate(key: 'LLL:EXT:core/Resources/Private/Language/locallang_core.xlf:labels.contextMenu.open')}"
|
||||
>
|
||||
<core:iconForRecord table="be_groups" row="{group.row}"/>
|
||||
</button>
|
||||
<backend:link.editRecord
|
||||
table="be_groups"
|
||||
uid="{group.row.uid}"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:btn.edit')}"
|
||||
>
|
||||
{group.row.title}<f:if condition="{showUid}"> <code>[{group.row.uid}]</code></f:if>
|
||||
</backend:link.editRecord>
|
||||
</td>
|
||||
</tr>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.subgroup" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:languages" /></h2>
|
||||
<f:if condition="{data.languages}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-languages-collapse"
|
||||
aria-controls="permission-group-languages-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedLanguages" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-languages-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="languages" arguments="{languages: data.languages}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedLanguages" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:permissions" /></h2>
|
||||
<h3><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:generalPermissions" /></h3>
|
||||
<f:if condition="{data.modules}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-modules-collapse"
|
||||
aria-controls="permission-group-modules-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:userMods" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-modules-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="modules" arguments="{modules: data.modules}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:userMods" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.pageTypes}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-pageType-collapse"
|
||||
aria-controls="permission-group-pageType-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.pagetypes_select" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-pageType-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="pageTypes" arguments="{pageTypes: data.pageTypes}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.pagetypes_select" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.pageContentTypes}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-pageContentTypes-collapse"
|
||||
aria-controls="permission-group-pageContentTypes-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedPageContentTypes" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-pageContentTypes-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="pageContentTypes" arguments="{pageContentTypes: data.pageContentTypes}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:allowedPageContentTypes" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.tables.all}">
|
||||
<f:then>
|
||||
<h3 class="headline-spaced"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compare.tables" /></h3>
|
||||
<f:render partial="Compare/Information" section="tables" arguments="{tables: data.tables}" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:compare.tables" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.non_exclude_fields}">
|
||||
<f:then>
|
||||
<h3 class="headline-spaced"><f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.non_exclude_fields" /></h3>
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="nonExcludeFields"
|
||||
arguments="{
|
||||
nonExcludeFields: data.non_exclude_fields,
|
||||
id: data.user.uid
|
||||
}"
|
||||
/>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.non_exclude_fields" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:mountsWorkspaces" /></h2>
|
||||
<f:if condition="{data.workspaces} && {data.workspaces.record.uid}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-workspaces-collapse"
|
||||
aria-controls="permission-group-workspaces-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-workspaces-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="workspaces" arguments="{workspaces: data.workspaces}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:workspace_perms" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.dbMounts}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-dbMounts-collapse"
|
||||
aria-controls="permission-group-dbMounts-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:pageTreeEntryPoints" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-dbMounts-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="dbMounts" arguments="{dbMounts: data.dbMounts}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:pageTreeEntryPoints" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.fileMounts}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-fileMounts-collapse"
|
||||
aria-controls="permission-group-fileMounts-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:fileMounts" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-fileMounts-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="fileMounts" arguments="{fileMounts: data.fileMounts}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:fileMounts" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.fileFolderPermissions}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-fileFolderPermissions-collapse"
|
||||
aria-controls="permission-group-fileFolderPermissions-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.fileoper_perms" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-fileFolderPermissions-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="fileFolderPermissions" arguments="{fileFolderPermissions: data.fileFolderPermissions}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:be_groups.fileoper_perms" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{data.categories}">
|
||||
<f:then>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading" role="tab">
|
||||
<div class="panel-heading-row">
|
||||
<button
|
||||
class="panel-button collapsed"
|
||||
type="button"
|
||||
data-bs-toggle="collapse"
|
||||
data-bs-target="#permission-group-categories-collapse"
|
||||
aria-controls="permission-group-categories-collapse"
|
||||
aria-expanded="false"
|
||||
>
|
||||
<div class="panel-title">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:category_perms" />
|
||||
</div>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="permission-group-categories-collapse" class="panel-collapse collapse" data-persist-collapse-state="true" role="tabpanel">
|
||||
<f:render partial="Compare/Information" section="categories" arguments="{categories: data.categories}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:category_perms" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<h2><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:options" /></h2>
|
||||
<f:if condition="{data.tsconfig}">
|
||||
<f:then>
|
||||
<f:render
|
||||
partial="Compare/Information"
|
||||
section="tsconfig"
|
||||
arguments="{
|
||||
tsconfig: data.tsconfig,
|
||||
id: data.user.uid
|
||||
}"
|
||||
/>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<f:translate key="LLL:EXT:core/Resources/Private/Language/locallang_tca.xlf:TSconfig" />
|
||||
</div>
|
||||
<div class="panel-body">
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:backendUser.show.notConfigured" /></p>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,37 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module" />
|
||||
<f:section name="Content">
|
||||
|
||||
<h1><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemount.list.title" /></h1>
|
||||
<f:if condition="{totalAmountOfFilemounts} > 0">
|
||||
<f:then>
|
||||
<f:render partial="Filemount/PaginatedList" arguments="{_all}" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:be.infobox
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemount.infobox.noFilemountFound.title')}"
|
||||
state="{f:constant(name: 'TYPO3\CMS\Core\Type\ContextualFeedbackSeverity::INFO')}"
|
||||
>
|
||||
<p><f:translate key="filemount.infobox.noFilemountFound.message" /></p>
|
||||
<backend:link.newRecord
|
||||
table="sys_filemounts"
|
||||
returnUrl="{f:be.uri(route: 'backend_user_management')}"
|
||||
class="btn btn-default"
|
||||
role="button"
|
||||
>
|
||||
<core:icon identifier="actions-add" />
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang.xlf:filemount.create" />
|
||||
</backend:link.newRecord>
|
||||
</f:be.infobox>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<html
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:render partial="Permission/Groupname" arguments="{pageId: pageId, groupId: groupId, groupname: groupname}" />
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,43 @@
|
||||
<html
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<span id="{elementId}">
|
||||
<div class="input-group">
|
||||
<select class="form-select form-select-sm" name="new_page_group" id="new_page_group">
|
||||
<f:if condition="{addCurrentGroup}">
|
||||
<f:then><option value="{groupUid}" selected>{groupname}</option></f:then>
|
||||
<f:else><option value="0"></option></f:else>
|
||||
</f:if>
|
||||
<f:for each="{groups}" key="uid" as="group">
|
||||
<option value="{uid}" {f:if(condition: '{uid} == {groupUid}', then: 'selected')}>{group.title}</option>
|
||||
</f:for>
|
||||
</select>
|
||||
<button
|
||||
type="button"
|
||||
class="savegroup btn btn-sm btn-default"
|
||||
title="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:changeGroup')}"
|
||||
data-page="{pageId}"
|
||||
data-group-id="{groupUid}"
|
||||
data-element-id="{elementId}"
|
||||
>
|
||||
<core:icon identifier="actions-document-save" size="small"/>
|
||||
</button>
|
||||
<button
|
||||
type="button"
|
||||
class="restoregroup btn btn-sm btn-default"
|
||||
title="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
|
||||
data-page="{pageId}"
|
||||
data-group-id="{groupUid}"
|
||||
data-element-id="{elementId}"
|
||||
data-if-not-set="[not set]"
|
||||
{f:if(condition: groupname, then: 'data-groupname="{groupname}"')}
|
||||
>
|
||||
<core:icon identifier="actions-close" size="small"/>
|
||||
</button>
|
||||
</span>
|
||||
</span>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<html
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:render partial="Permission/Ownername" arguments="{pageId: pageId, userId: userId, username: username}" />
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,41 @@
|
||||
<html
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<span id="{elementId}">
|
||||
<div class="input-group">
|
||||
<select class="form-select form-select-sm" name="new_page_owner" id="new_page_owner">
|
||||
<f:if condition="{addCurrentUser}">
|
||||
<f:then><option value="{ownerUid}" selected>{username}</option></f:then>
|
||||
<f:else><option value="0"></option></f:else>
|
||||
</f:if>
|
||||
<f:for each="{users}" key="uid" as="user">
|
||||
<option value="{uid}" {f:if(condition: '{uid} == {ownerUid}', then: 'selected')}>{user.username}</option>
|
||||
</f:for>
|
||||
</select>
|
||||
<button type="button"
|
||||
class="saveowner btn btn-sm btn-default"
|
||||
title="{f:translate(key:'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:changeOwner')}"
|
||||
data-page="{pageId}"
|
||||
data-owner="{ownerUid}"
|
||||
data-element-id="{elementId}"
|
||||
>
|
||||
<core:icon identifier="actions-document-save" size="small"/>
|
||||
</button>
|
||||
<button type="button"
|
||||
class="restoreowner btn btn-sm btn-default"
|
||||
title="{f:translate(key:'LLL:EXT:core/Resources/Private/Language/locallang_common.xlf:cancel')}"
|
||||
data-page="{pageId}"
|
||||
data-owner="{ownerUid}"
|
||||
data-element-id="{elementId}"
|
||||
data-if-not-set="[not set]"
|
||||
{f:if(condition: username, then: 'data-username="{username}"')}
|
||||
>
|
||||
<core:icon identifier="actions-close" size="small"/>
|
||||
</button>
|
||||
</div>
|
||||
</span>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,8 @@
|
||||
<html
|
||||
xmlns:beuser="http://typo3.org/ns/TYPO3/CMS/Beuser/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<beuser:permissions permission="{permission}" scope="{scope}" pageId="{pageId}" />
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,175 @@
|
||||
<html
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module" />
|
||||
<f:section name="Content">
|
||||
|
||||
<f:asset.module identifier="@typo3/beuser/permissions.js"/>
|
||||
|
||||
<h1>
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:permissions" />:
|
||||
<f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Edit" />
|
||||
</h1>
|
||||
|
||||
<f:comment><!-- {base} is defined as it's *required* for mathematical operations in Fluid --></f:comment>
|
||||
<f:variable name="base" value="2" />
|
||||
|
||||
<form action="{formAction}" method="post" name="editform" id="PermissionControllerEdit">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="selectOwner"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Owner" /></label>
|
||||
<select class="form-select" name="data[pages][{id}][perms_userid]" id="selectOwner">
|
||||
<f:for each="{beUserData}" key="userId" as="user">
|
||||
<option value="{userId}" {f:if(condition: '{userId} == {currentBeUser}', then: 'selected')}>{user}</option>
|
||||
</f:for>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="selectGroup"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Group" /></label>
|
||||
<f:if condition="{f:count(subject:beGroupData)} > 1">
|
||||
<f:then>
|
||||
<select class="form-select" name="data[pages][{id}][perms_groupid]" id="selectGroup">
|
||||
<f:for each="{beGroupData}" key="groupId" as="group">
|
||||
<option value="{groupId}" {f:if(condition: '{groupId} == {currentBeGroup}', then: 'selected')}>{group}</option>
|
||||
</f:for>
|
||||
</select>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="alert alert-notice"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:noGroups" /></div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label" for="recursionLevel"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Depth" /></label>
|
||||
<select class="form-select" name="mirror[pages][{id}]" id="recursionLevel">
|
||||
<f:for each="{recursiveSelectOptions}" key="depth" as="depthLabel">
|
||||
<option value="{depth}" {f:if(condition: '{depth} == {currentBeUser}', then: 'selected')}>{depthLabel}</option>
|
||||
</f:for>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="table-fit">
|
||||
<table class="table table-striped table-hover" id="typo3-permissionMatrix">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:1" /></th>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:16" /></th>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:2" /></th>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:4" /></th>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:8" /></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Owner" /></strong></td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_user][]" value="{base ^ 0}" data-check-change-permissions="check[perms_user],data[pages][{id}][perms_user]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_user][]" value="{base ^ 4}" data-check-change-permissions="check[perms_user],data[pages][{id}][perms_user]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_user][]" value="{base ^ 1}" data-check-change-permissions="check[perms_user],data[pages][{id}][perms_user]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_user][]" value="{base ^ 2}" data-check-change-permissions="check[perms_user],data[pages][{id}][perms_user]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_user][]" value="{base ^ 3}" data-check-change-permissions="check[perms_user],data[pages][{id}][perms_user]" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Group" /></strong></td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_group][]" value="{base ^ 0}" data-check-change-permissions="check[perms_group],data[pages][{id}][perms_group]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_group][]" value="{base ^ 4}" data-check-change-permissions="check[perms_group],data[pages][{id}][perms_group]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_group][]" value="{base ^ 1}" data-check-change-permissions="check[perms_group],data[pages][{id}][perms_group]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_group][]" value="{base ^ 2}" data-check-change-permissions="check[perms_group],data[pages][{id}][perms_group]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_group][]" value="{base ^ 3}" data-check-change-permissions="check[perms_group],data[pages][{id}][perms_group]" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Everybody" /></strong></td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_everybody][]" value="{base ^ 0}" data-check-change-permissions="check[perms_everybody],data[pages][{id}][perms_everybody]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_everybody][]" value="{base ^ 4}" data-check-change-permissions="check[perms_everybody],data[pages][{id}][perms_everybody]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_everybody][]" value="{base ^ 1}" data-check-change-permissions="check[perms_everybody],data[pages][{id}][perms_everybody]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_everybody][]" value="{base ^ 2}" data-check-change-permissions="check[perms_everybody],data[pages][{id}][perms_everybody]" />
|
||||
</div>
|
||||
</td>
|
||||
<td>
|
||||
<div class="form-check form-check-type-toggle">
|
||||
<input class="form-check-input" type="checkbox" name="check[perms_everybody][]" value="{base ^ 3}" data-check-change-permissions="check[perms_everybody],data[pages][{id}][perms_everybody]" />
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<input type="hidden" name="data[pages][{id}][perms_user]" value="{pageInfo.perms_user}" data-checkbox-group="check[perms_user]" />
|
||||
<input type="hidden" name="data[pages][{id}][perms_group]" value="{pageInfo.perms_group}" data-checkbox-group="check[perms_group]" />
|
||||
<input type="hidden" name="data[pages][{id}][perms_everybody]" value="{pageInfo.perms_everybody}" data-checkbox-group="check[perms_everybody]" />
|
||||
<input type="hidden" name="depth" value="{depth}" />
|
||||
<input type="hidden" name="returnUrl" value="{returnUrl}" />
|
||||
</form>
|
||||
|
||||
<h3><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Legend" /></h3>
|
||||
<p>
|
||||
<strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:1" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:1_t" /> <br>
|
||||
<strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:16" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:16_t" /> <br>
|
||||
<strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:2" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:2_t" /> <br>
|
||||
<strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:4" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:4_t" /> <br>
|
||||
<strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:8" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:8_t" />
|
||||
</p>
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:def" /></p>
|
||||
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,196 @@
|
||||
<html
|
||||
xmlns:backend="http://typo3.org/ns/TYPO3/CMS/Backend/ViewHelpers"
|
||||
xmlns:beuser="http://typo3.org/ns/TYPO3/CMS/Beuser/ViewHelpers"
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:layout name="Module" />
|
||||
<f:section name="Content">
|
||||
|
||||
<f:asset.module identifier="@typo3/beuser/permissions.js"/>
|
||||
|
||||
<h1><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:permissions" /></h1>
|
||||
|
||||
<div class="table-fit">
|
||||
<table class="table table-striped table-hover" id="typo3-permissionList">
|
||||
<thead>
|
||||
<tr>
|
||||
<th></th>
|
||||
<th colspan="2"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Owner" /></th>
|
||||
<th colspan="2"><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Group" /></th>
|
||||
<th><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Everybody" /></th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<f:for each="{viewTree}" as="data">
|
||||
<tr>
|
||||
<f:if condition="{data.row.uid}">
|
||||
<f:then>
|
||||
<f:variable name="editUrl"><f:spaceless>
|
||||
<backend:moduleLink route="permissions_pages" arguments="{id: '{f:if(condition: data.row._ORIG_uid, then: data.row._ORIG_uid, else: data.row.uid)}', action: 'edit', depth: depth, returnUrl: returnUrl}" />
|
||||
</f:spaceless></f:variable>
|
||||
|
||||
<f:comment>
|
||||
A "normal" page row is rendered, not the root page
|
||||
</f:comment>
|
||||
|
||||
<td class="col-title col-responsive permission-column-name">
|
||||
<div class="treeline-container">
|
||||
<f:spaceless>
|
||||
{data.depthData -> f:format.raw()}{data.HTML -> f:format.raw()}
|
||||
<f:if condition="{data.icon}">{data.icon -> f:format.raw()}</f:if>
|
||||
</f:spaceless>
|
||||
<a class="treeline-label"
|
||||
href="{editUrl}"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}"
|
||||
>{data.row.title}</a>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
<td class="permission-column-list">
|
||||
<beuser:permissions permission="{data.row.perms_user}" scope="user" pageId="{data.row.uid}" />
|
||||
</td>
|
||||
<td class="permission-column-group">
|
||||
<f:render
|
||||
partial="Permission/Ownername"
|
||||
arguments="{
|
||||
pageId: '{data.row.uid}',
|
||||
userId: '{data.row.perms_userid}',
|
||||
username: '{beuser:arrayElement(array:beUsers, key:data.row.perms_userid, subKey:\'username\')}'
|
||||
}"
|
||||
/>
|
||||
</td>
|
||||
|
||||
<td class="permission-column-list">
|
||||
<beuser:permissions permission="{data.row.perms_group}" scope="group" pageId="{data.row.uid}" />
|
||||
</td>
|
||||
<td class="permission-column-group">
|
||||
<f:render
|
||||
partial="Permission/Groupname"
|
||||
arguments="{
|
||||
pageId: '{data.row.uid}',
|
||||
groupId: '{data.row.perms_groupid}',
|
||||
groupname: '{beuser:arrayElement(array:beGroups, key:data.row.perms_groupid, subKey:\'title\')}'
|
||||
}"
|
||||
/>
|
||||
</td>
|
||||
|
||||
<td class="permission-column-list">
|
||||
<beuser:permissions permission="{data.row.perms_everybody}" scope="everybody" pageId="{data.row.uid}" />
|
||||
</td>
|
||||
|
||||
<td class="col-control">
|
||||
<span class="btn-group">
|
||||
<f:if condition="{data.row.editlock}">
|
||||
<f:then>
|
||||
<button
|
||||
type="button"
|
||||
class="editlock btn btn-sm btn-default"
|
||||
data-page="{data.row.uid}"
|
||||
data-lockstate="1"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr')}"
|
||||
>
|
||||
<core:icon identifier="actions-lock" />
|
||||
</button>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<button
|
||||
type="button"
|
||||
class="editlock btn btn-sm btn-default"
|
||||
data-page="{data.row.uid}"
|
||||
data-lockstate="0"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr2')}"
|
||||
>
|
||||
<core:icon identifier="actions-unlock" />
|
||||
</button>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:comment>
|
||||
Edit link is workspace aware: If in ws, link to edit the ws overlay record is rendered
|
||||
</f:comment>
|
||||
<a href="{editUrl}"
|
||||
class="btn btn-sm btn-default"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:ch_permissions')}">
|
||||
<core:icon identifier="actions-open" />
|
||||
</a>
|
||||
</span>
|
||||
</td>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:comment>
|
||||
Root page row is rendered
|
||||
</f:comment>
|
||||
<td class="permission-column-name">
|
||||
<f:format.raw>{data.HTML}</f:format.raw>
|
||||
<f:if condition="{data.icon}">{data.icon -> f:format.raw()}</f:if>
|
||||
{data.row.title -> f:format.crop(maxCharacters:20)}
|
||||
</td>
|
||||
<td colspan="6"></td>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<h3><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:Legend" />:</h3>
|
||||
<div class="access-legend">
|
||||
<table>
|
||||
<tr>
|
||||
<td class="edge nowrap"><span><span></span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="nowrap"><span class="number">1</span></td>
|
||||
<td class="nowrap"><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:1" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:1_t" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t3-vr nowrap"><span></span></td>
|
||||
<td class="edge nowrap"><span><span></span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="nowrap"><span class="number">2</span></td>
|
||||
<td class="nowrap"><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:16" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:16_t" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t3-vr nowrap"><span></span></td>
|
||||
<td class="t3-vr nowrap"><span></span></td>
|
||||
<td class="edge nowrap"><span><span></span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="nowrap"><span class="number">3</span></td>
|
||||
<td class="nowrap"><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:2" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:2_t" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="t3-vr nowrap"><span></span></td>
|
||||
<td class="t3-vr nowrap"><span></span></td>
|
||||
<td class="t3-vr nowrap"><span></span></td>
|
||||
<td class="edge nowrap"><span><span></span></span></td>
|
||||
<td class="hr nowrap"><span></span></td>
|
||||
<td class="nowrap"><span class="number">4</span></td>
|
||||
<td class="nowrap"><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:4" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:4_t" /></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap"><core:icon identifier="status-status-permission-granted" /></td>
|
||||
<td class="nowrap"><core:icon identifier="status-status-permission-denied" /></td>
|
||||
<td class="nowrap"><core:icon identifier="status-status-permission-granted" /></td>
|
||||
<td class="nowrap"><core:icon identifier="status-status-permission-denied" /></td>
|
||||
<td class="nowrap"><core:icon identifier="status-status-permission-denied" /></td>
|
||||
<td class="nowrap"><span class="number">5</span></td>
|
||||
<td class="nowrap"><strong><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:8" /></strong>: <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:8_t" /></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<p><f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:def" /></p>
|
||||
<p>
|
||||
<core:icon identifier="status-status-permission-granted" /> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:A_Granted" /><br>
|
||||
<core:icon identifier="status-status-permission-denied" /> <f:translate key="LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:A_Denied" />
|
||||
</p>
|
||||
|
||||
</f:section>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,30 @@
|
||||
<html
|
||||
xmlns:core="http://typo3.org/ns/TYPO3/CMS/Core/ViewHelpers"
|
||||
xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers"
|
||||
data-namespace-typo3-fluid="true"
|
||||
>
|
||||
|
||||
<f:if condition="{editLockState}">
|
||||
<f:then>
|
||||
<button type="button"
|
||||
class="editlock btn btn-sm btn-default"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr')}"
|
||||
data-page="{pageId}"
|
||||
data-lockstate="1"
|
||||
>
|
||||
<core:icon identifier="actions-lock" size="small" />
|
||||
</button>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<button type="button"
|
||||
class="editlock btn btn-sm btn-default"
|
||||
title="{f:translate(key: 'LLL:EXT:beuser/Resources/Private/Language/locallang_mod_permission.xlf:EditLock_descr2')}"
|
||||
data-page="{pageId}"
|
||||
data-lockstate="0"
|
||||
>
|
||||
<core:icon identifier="actions-unlock" size="small" />
|
||||
</button>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 676 B |
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import e from"@typo3/core/event/regular-event.js";import s from"@typo3/core/document-service.js";class i{constructor(){this.searchField=document.querySelector("#tx_Beuser_username"),this.activeSearch=this.searchField?this.searchField.value!=="":!1,s.ready().then(()=>{this.searchField&&new e("search",()=>{this.searchField.value===""&&this.activeSearch&&this.searchField.closest("form").submit()}).bindTo(this.searchField)})}}var r=new i;export{r as default};
|
||||
@@ -0,0 +1,13 @@
|
||||
/*
|
||||
* This file is part of the TYPO3 CMS project.
|
||||
*
|
||||
* It is free software; you can redistribute it and/or modify it under
|
||||
* the terms of the GNU General Public License, either version 2
|
||||
* of the License, or any later version.
|
||||
*
|
||||
* For the full copyright and license information, please read the
|
||||
* LICENSE.txt file that was distributed with this source code.
|
||||
*
|
||||
* The TYPO3 project - inspiring people to share!
|
||||
*/
|
||||
import r from"@typo3/core/event/regular-event.js";import c from"@typo3/core/ajax/ajax-request.js";class i{constructor(){this.options={containerSelector:"#typo3-permissionList",editControllerSelector:"#PermissionControllerEdit"},this.ajaxUrl=TYPO3.settings.ajaxUrls.user_access_permissions,this.initializeCheckboxGroups(),this.initializeEvents()}static setPermissionCheckboxes(e,o){const t=document.querySelectorAll(`input[type="checkbox"][name^="${e}"]`);for(const a of t){const s=parseInt(a.value,10);a.checked=(o&s)===s}}static updatePermissionValue(e,o){let t=0;const a=document.querySelectorAll(`input[type="checkbox"][name^="${e}"]:checked`);for(const s of a)t|=parseInt(s.value,10);document.forms.namedItem("editform")[o].value=t|(e==="check[perms_user]"?1:0)}setPermissions(e){const o=e.dataset.page,t=e.dataset.who,a=e.dataset.bits;new c(this.ajaxUrl).post({page:o,who:t,permissions:e.dataset.permissions,mode:e.dataset.mode,bits:e.dataset.bits}).then(async s=>{const n=await s.resolve(),p=e.parentElement;p.innerHTML=n,p.querySelector('button[data-bits="'+a+'"]').focus()})}toggleEditLock(e){const o=e.dataset.page;new c(this.ajaxUrl).post({action:"toggle_edit_lock",page:o,editLockState:e.dataset.lockstate}).then(async t=>{const a=await t.resolve(),s=e.parentElement;e.outerHTML=a,s.querySelector('button[data-page="'+o+'"]').focus()})}changeOwner(e){const o=e.dataset.page,t=document.getElementById("o_"+o);new c(this.ajaxUrl).post({action:"change_owner",page:o,ownerUid:e.dataset.owner,newOwnerUid:t.getElementsByTagName("select")[0].value}).then(async a=>{t.outerHTML=await a.resolve()})}showChangeOwnerSelector(e){const o=e.dataset.page;new c(this.ajaxUrl).post({action:"show_change_owner_selector",page:o,ownerUid:e.dataset.owner,username:e.dataset.username}).then(async t=>{document.getElementById("o_"+o).outerHTML=await t.resolve()})}restoreOwner(e){const o=e.dataset.page,t=e.dataset.username??e.dataset.ifNotSet,a=document.createElement("span");a.setAttribute("id",`o_${o}`);const s=document.createElement("button");s.classList.add("ug_selector","changeowner","btn","btn-sm","btn-link"),s.setAttribute("type","button"),s.setAttribute("data-page",o),s.setAttribute("data-owner",e.dataset.owner),s.setAttribute("data-username",t),s.innerText=t,a.appendChild(s);const n=document.getElementById("o_"+o);n.parentNode.replaceChild(a,n)}restoreGroup(e){const o=e.dataset.page,t=e.dataset.groupname??e.dataset.ifNotSet,a=document.createElement("span");a.setAttribute("id",`g_${o}`);const s=document.createElement("button");s.classList.add("ug_selector","changegroup","btn","btn-sm","btn-link"),s.setAttribute("type","button"),s.setAttribute("data-page",o),s.setAttribute("data-group-id",e.dataset.groupId),s.setAttribute("data-groupname",t),s.innerText=t,a.appendChild(s);const n=document.getElementById("g_"+o);n.parentNode.replaceChild(a,n)}changeGroup(e){const o=e.dataset.page,t=document.getElementById("g_"+o);new c(this.ajaxUrl).post({action:"change_group",page:o,groupUid:e.dataset.groupId,newGroupUid:t.getElementsByTagName("select")[0].value}).then(async a=>{t.outerHTML=await a.resolve()})}showChangeGroupSelector(e){const o=e.dataset.page;new c(this.ajaxUrl).post({action:"show_change_group_selector",page:o,groupUid:e.dataset.groupId,groupname:e.dataset.groupname}).then(async t=>{document.getElementById("g_"+o).outerHTML=await t.resolve()})}initializeCheckboxGroups(){document.querySelectorAll("[data-checkbox-group]").forEach(o=>{const t=o.dataset.checkboxGroup,a=parseInt(o.value,10);i.setPermissionCheckboxes(t,a)})}initializeEvents(){const e=document.querySelector(this.options.containerSelector),o=document.querySelector(this.options.editControllerSelector);e!==null&&(new r("click",(t,a)=>{t.preventDefault(),this.setPermissions(a)}).delegateTo(e,".change-permission"),new r("click",(t,a)=>{t.preventDefault(),this.toggleEditLock(a)}).delegateTo(e,".editlock"),new r("click",(t,a)=>{t.preventDefault(),this.showChangeOwnerSelector(a)}).delegateTo(e,".changeowner"),new r("click",(t,a)=>{t.preventDefault(),this.showChangeGroupSelector(a)}).delegateTo(e,".changegroup"),new r("click",(t,a)=>{t.preventDefault(),this.restoreOwner(a)}).delegateTo(e,".restoreowner"),new r("click",(t,a)=>{t.preventDefault(),this.changeOwner(a)}).delegateTo(e,".saveowner"),new r("click",(t,a)=>{t.preventDefault(),this.restoreGroup(a)}).delegateTo(e,".restoregroup"),new r("click",(t,a)=>{t.preventDefault(),this.changeGroup(a)}).delegateTo(e,".savegroup")),o!==null&&new r("click",(t,a)=>{const s=a.dataset.checkChangePermissions.split(",").map(n=>n.trim());i.updatePermissionValue.apply(this,s)}).delegateTo(o,"[data-check-change-permissions]")}}var l=new i;export{l as default};
|
||||
@@ -0,0 +1,56 @@
|
||||
{
|
||||
"name": "typo3/cms-beuser",
|
||||
"type": "typo3-cms-framework",
|
||||
"description": "TYPO3 CMS Backend User - TYPO3 backend module Administration > Users for managing backend users and groups.",
|
||||
"homepage": "https://typo3.community/",
|
||||
"funding": [
|
||||
{
|
||||
"type": "membership",
|
||||
"url": "https://typo3.org/membership"
|
||||
}
|
||||
],
|
||||
"license": [
|
||||
"GPL-2.0-or-later"
|
||||
],
|
||||
"authors": [
|
||||
{
|
||||
"name": "TYPO3 Core Team",
|
||||
"email": "typo3cms@typo3.org",
|
||||
"role": "Developer"
|
||||
}
|
||||
],
|
||||
"support": {
|
||||
"issues": "https://forge.typo3.org/issues/",
|
||||
"forum": "https://talk.typo3.org/",
|
||||
"source": "https://github.com/TYPO3/typo3/",
|
||||
"docs": "https://docs.typo3.org/",
|
||||
"rss": "https://news.typo3.com/rss/",
|
||||
"chat": "https://typo3.community/meet/slack/",
|
||||
"security": "https://typo3.org/security/"
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"typo3/cms-core": "15.0.*@dev"
|
||||
},
|
||||
"conflict": {
|
||||
"typo3/cms": "*"
|
||||
},
|
||||
"extra": {
|
||||
"branch-alias": {
|
||||
"dev-main": "15.0.x-dev"
|
||||
},
|
||||
"typo3/cms": {
|
||||
"Package": {
|
||||
"partOfFactoryDefault": true
|
||||
},
|
||||
"extension-key": "beuser"
|
||||
}
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"TYPO3\\CMS\\Beuser\\": "Classes/"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user