2026-02-04 23:31:53 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* @var array<int, string> $errors
|
|
|
|
|
* @var array $form
|
|
|
|
|
* @var array $permission
|
2026-02-24 08:49:40 +01:00
|
|
|
* @var bool $canUpdatePermission
|
|
|
|
|
* @var bool $canDeletePermission
|
2026-02-04 23:31:53 +01:00
|
|
|
*/
|
|
|
|
|
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
use MintyPHP\Session;
|
|
|
|
|
|
2026-02-24 08:49:40 +01:00
|
|
|
$canUpdatePermission = (bool) ($canUpdatePermission ?? false);
|
|
|
|
|
$canDeletePermission = (bool) ($canDeletePermission ?? false);
|
|
|
|
|
|
2026-02-04 23:31:53 +01:00
|
|
|
?>
|
|
|
|
|
<div class="app-details-container">
|
|
|
|
|
<section>
|
2026-02-11 19:28:12 +01:00
|
|
|
<?php
|
|
|
|
|
$breadcrumbs = [
|
|
|
|
|
['label' => t('Home'), 'path' => 'admin'],
|
|
|
|
|
['label' => t('Permissions'), 'path' => 'admin/permissions'],
|
|
|
|
|
['label' => t('Edit permission')],
|
|
|
|
|
];
|
|
|
|
|
require templatePath('partials/app-breadcrumb.phtml');
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
$titlebar = [
|
|
|
|
|
'title' => t('Edit permission'),
|
|
|
|
|
'backHref' => 'admin/permissions',
|
|
|
|
|
'backTitle' => t('Cancel'),
|
2026-02-24 08:49:40 +01:00
|
|
|
'actions' => $canUpdatePermission ? [
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
[
|
|
|
|
|
'form' => 'permission-form',
|
|
|
|
|
'name' => 'action',
|
|
|
|
|
'value' => 'save',
|
|
|
|
|
'class' => 'secondary outline',
|
|
|
|
|
'label' => t('Save'),
|
|
|
|
|
],
|
|
|
|
|
[
|
|
|
|
|
'form' => 'permission-form',
|
|
|
|
|
'name' => 'action',
|
|
|
|
|
'value' => 'save_close',
|
|
|
|
|
'class' => 'primary',
|
|
|
|
|
'label' => t('Save & close'),
|
|
|
|
|
],
|
|
|
|
|
] : [],
|
|
|
|
|
];
|
|
|
|
|
require templatePath('partials/app-details-titlebar.phtml');
|
2026-02-11 19:28:12 +01:00
|
|
|
?>
|
2026-03-04 15:56:58 +01:00
|
|
|
<?php
|
|
|
|
|
$validationSummaryErrors = $validationSummaryErrors ?? ($errors ?? []);
|
|
|
|
|
require templatePath('partials/app-details-validation-summary.phtml');
|
|
|
|
|
?>
|
2026-02-04 23:31:53 +01:00
|
|
|
<?php
|
|
|
|
|
$values = $form ?? $permission ?? [];
|
2026-02-24 08:49:40 +01:00
|
|
|
$isReadOnly = !$canUpdatePermission;
|
2026-02-04 23:31:53 +01:00
|
|
|
$detailsOpenAll = true;
|
|
|
|
|
$isReadOnly = $isReadOnly ?? false;
|
2026-02-24 08:49:40 +01:00
|
|
|
$showDangerZone = $canDeletePermission;
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
$dangerZoneDeleteFormId = $showDangerZone ? 'permission-delete-form' : '';
|
|
|
|
|
$dangerZoneWarning = t('This will permanently delete this permission.');
|
|
|
|
|
$dangerZoneActionLabel = t('Delete permission');
|
2026-02-04 23:31:53 +01:00
|
|
|
require __DIR__ . '/_form.phtml';
|
|
|
|
|
?>
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
<?php if ($showDangerZone): ?>
|
|
|
|
|
<form
|
|
|
|
|
id="permission-delete-form"
|
|
|
|
|
method="post"
|
|
|
|
|
action="admin/permissions/delete/<?php e((string) ($permission['id'] ?? '')); ?>"
|
|
|
|
|
hidden
|
2026-03-04 15:56:58 +01:00
|
|
|
data-detail-confirm-message="<?php e(t('Delete this permission?')); ?>"
|
|
|
|
|
data-detail-action-kind="delete"
|
add composer-unused, comprehensive docs, and project restructure
- Add icanhazstring/composer-unused as dev dependency for dependency hygiene checks
- Add German documentation (docs/) covering architecture, conventions, workflows, and developer checklists
- Add API layer (ApiAuth, ApiBootstrap, ApiResponse), audit, scheduler, custom fields, and SSO services
- Add Microsoft OIDC SSO, API token management, and user lifecycle features
- Add swagger-ui vendor integration and OpenAPI spec
- Add production Docker setup and bin/ scripts
- Update composer dependencies, config, templates, and frontend assets throughout
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-22 15:27:35 +01:00
|
|
|
>
|
|
|
|
|
<?php Session::getCsrfInput(); ?>
|
|
|
|
|
</form>
|
2026-02-11 19:28:12 +01:00
|
|
|
<?php endif; ?>
|
2026-02-04 23:31:53 +01:00
|
|
|
</section>
|
|
|
|
|
<aside id="app-details-aside-section">
|
|
|
|
|
<div class="app-details-aside-section">
|
|
|
|
|
<hgroup>
|
|
|
|
|
<h2><?php e($values['key'] ?? ''); ?></h2>
|
|
|
|
|
<p><?php e(t('Permission')); ?></p>
|
|
|
|
|
</hgroup>
|
2026-02-11 19:28:12 +01:00
|
|
|
<div class="badge-list">
|
|
|
|
|
<?php if ((string) ($values['active'] ?? '1') === '0'): ?>
|
|
|
|
|
<span class="badge" data-variant="danger"><?php e(t('Inactive')); ?></span>
|
|
|
|
|
<?php else: ?>
|
|
|
|
|
<span class="badge" data-variant="success"><?php e(t('Active')); ?></span>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
<?php if (!empty($values['is_system'])): ?>
|
|
|
|
|
<span class="badge" data-variant="neutral"><?php e(t('System')); ?></span>
|
|
|
|
|
<?php endif; ?>
|
|
|
|
|
</div>
|
2026-02-04 23:31:53 +01:00
|
|
|
<hr>
|
|
|
|
|
</div>
|
|
|
|
|
</aside>
|
2026-02-11 19:28:12 +01:00
|
|
|
</div>
|