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>
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
* @var array $permission
|
||||
*/
|
||||
|
||||
use MintyPHP\Session;
|
||||
|
||||
?>
|
||||
<div class="app-details-container">
|
||||
<section>
|
||||
@@ -16,39 +18,29 @@
|
||||
['label' => t('Edit permission')],
|
||||
];
|
||||
require templatePath('partials/app-breadcrumb.phtml');
|
||||
$titlebar = [
|
||||
'title' => t('Edit permission'),
|
||||
'backHref' => 'admin/permissions',
|
||||
'backTitle' => t('Cancel'),
|
||||
'actions' => can('permissions.update') ? [
|
||||
[
|
||||
'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');
|
||||
?>
|
||||
<div class="app-details-titlebar">
|
||||
<h1>
|
||||
<a href="admin/permissions" title="<?php e(t('Cancel')); ?>"><i class="bi bi-arrow-left"></i></a>
|
||||
<?php e(t('Edit permission')); ?>
|
||||
</h1>
|
||||
<div class="app-details-titlebar-actions">
|
||||
<?php if (can('permissions.delete') && empty($permission['is_system'])): ?>
|
||||
<details class="dropdown">
|
||||
<summary role="button" class="outline secondary"><i class="bi bi-three-dots"></i></summary>
|
||||
<ul dir="rtl">
|
||||
<li>
|
||||
<form method="post" action="admin/permissions/delete/<?php e((string) ($permission['id'] ?? '')); ?>"
|
||||
onsubmit="return confirm('<?php e(t('Delete this permission?')); ?>');">
|
||||
<?php MintyPHP\Session::getCsrfInput(); ?>
|
||||
<button type="submit" class="transparent">
|
||||
<?php e(t('Delete')); ?>
|
||||
</button>
|
||||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</details>
|
||||
<?php endif; ?>
|
||||
<?php if (can('permissions.update')): ?>
|
||||
<button type="submit" form="permission-form" name="action" value="save" class="secondary outline">
|
||||
<?php e(t('Save')); ?>
|
||||
</button>
|
||||
<button type="submit" form="permission-form" name="action" value="save_close" class="primary">
|
||||
<?php e(t('Save & close')); ?>
|
||||
</button>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (!empty($errors)): ?>
|
||||
<div class="notice" data-variant="error">
|
||||
<ul>
|
||||
@@ -63,12 +55,22 @@
|
||||
$isReadOnly = !can('permissions.update');
|
||||
$detailsOpenAll = true;
|
||||
$isReadOnly = $isReadOnly ?? false;
|
||||
$showDangerZone = can('permissions.delete') && empty($permission['is_system']);
|
||||
$dangerZoneDeleteFormId = $showDangerZone ? 'permission-delete-form' : '';
|
||||
$dangerZoneWarning = t('This will permanently delete this permission.');
|
||||
$dangerZoneActionLabel = t('Delete permission');
|
||||
require __DIR__ . '/_form.phtml';
|
||||
?>
|
||||
<?php if (!empty($roles)): ?>
|
||||
<div>
|
||||
<?php multiSelectForm('permission-roles', 'role_ids', 'Assigned roles', 'Select roles', $roles, $selectedRoleIds ?? [], $isReadOnly, 'description', 'permission-form'); ?>
|
||||
</div>
|
||||
<?php if ($showDangerZone): ?>
|
||||
<form
|
||||
id="permission-delete-form"
|
||||
method="post"
|
||||
action="admin/permissions/delete/<?php e((string) ($permission['id'] ?? '')); ?>"
|
||||
hidden
|
||||
onsubmit="return confirm('<?php e(t('Delete this permission?')); ?>');"
|
||||
>
|
||||
<?php Session::getCsrfInput(); ?>
|
||||
</form>
|
||||
<?php endif; ?>
|
||||
</section>
|
||||
<aside id="app-details-aside-section">
|
||||
|
||||
Reference in New Issue
Block a user