Skip to content

Commit

Permalink
Azure AD authentication
Browse files Browse the repository at this point in the history
- added dependency on packages `68publishers/oauth` and `thenetworg/oauth2-azure`
- added yarn dependency on `clipboard`
- added database migration
- added new entity `ExternalAuth` in the User domain
- added `AzureAuthSettings` into the Global settings
- added azure settings form on the application settings page
- added possibility to sign in via Azure
- added copy buttons support for text form fields
- added translations
  • Loading branch information
tg666 committed Jan 26, 2024
1 parent ab37597 commit b5822a1
Show file tree
Hide file tree
Showing 68 changed files with 1,695 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

### Added

- Added authentication via Azure AD.

## 0.11.0 - 2023-10-24

### Added
Expand Down
1 change: 1 addition & 0 deletions assets/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ import './js/alpine';
import './js/live-form-validation';
import './js/modal/modal';
import './js/toastr';
import './js/clipboard';

import './css/style.css';
3 changes: 3 additions & 0 deletions assets/images/icon/common/document-duplicate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
62 changes: 62 additions & 0 deletions assets/js/clipboard.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const Clipboard = require('clipboard');
const tippy = require('tippy.js').default;

(function () {
(ready => {
if (document.readyState !== 'loading') {
ready();
return;
}

document.addEventListener('DOMContentLoaded', ready);
})(() => {
const timeouts = new WeakMap();

const showTooltip = (trigger, text) => {
if (!trigger._tippy) {
tippy(trigger, {
content: '',
placement: 'bottom',
trigger: 'manual',
})
}

tooltip = trigger._tippy;
tooltip.setContent(text);
tooltip.show();

if (timeouts.has(trigger)) {
clearTimeout(timeouts.get(trigger));
}

const timeout = setTimeout(() => {
tooltip.hide();
clearTimeout(timeouts.get(trigger));
}, 1500);

timeouts.set(trigger, timeout);
};

const cp = new Clipboard('[data-clipboard]');

cp.on('success', function (e) {
e.clearSelection();

const tooltipText = e.trigger.dataset.clipboardSuccessTooltip || undefined;

if (tooltipText) {
showTooltip(e.trigger, tooltipText);
}
});

cp.on('error', function (e) {
e.clearSelection();

const tooltipText = e.trigger.dataset.clipboardErrorTooltip || undefined;

if (tooltipText) {
showTooltip(e.trigger, tooltipText);
}
});
});
})();
2 changes: 2 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"68publishers/environment": "^1.0.1",
"68publishers/event-dispatcher-extra": "^1.1",
"68publishers/health-check": "^1.0.1",
"68publishers/oauth": "dev-main",
"68publishers/omni": "0.1.x-dev",
"68publishers/smart-nette-component": "^1.0",
"68publishers/tracy-git-version": "^1.2",
Expand Down Expand Up @@ -74,6 +75,7 @@
"spatie/color": "^1.5",
"symfony/lock": "^6.3",
"symfony/validator": "^6.3",
"thenetworg/oauth2-azure": "^2.2",
"ublaboo/datagrid": "^6.9.5",
"umpirsky/locale-list": "^1.0"
},
Expand Down
Loading

0 comments on commit b5822a1

Please sign in to comment.