Jakub Bouček [Mon, 31 Aug 2020 15:34:46 +0000 (17:34 +0200)]
Fix Czech translations (email -> e-mail)
In Czech language "email" does not means "email" but "enamel paint", correct is "e-mail".
See in Wikipedia:
- https://cs.wikipedia.org/wiki/E-mail
- https://cs.wikipedia.org/wiki/Email_(barva)
Dan Brown [Tue, 4 Aug 2020 16:54:50 +0000 (17:54 +0100)]
Prevented email confirmation exception throw on registration
Was preventing any other registration actions from taking place such as
LDAP/SAML group sync. Email confirmation should be actioned by
middleware on post-registration redirect.
Added testing to cover.
Tested for LDAP, SAML and normal registration with email confirmation
required to ensure flows work as expected.
Dan Brown [Tue, 4 Aug 2020 13:55:01 +0000 (14:55 +0100)]
Removed role 'name' field from database
The 'name' field was really redundant and caused confusion in the
codebase, since the 'Display' name is often used and we have a
'system_name' for the admin and public role.
This fixes #2032, Where external auth group matching has confusing
behaviour as matching was done against the display_name, if no
external_auth field is set, but only roles with a match 'name' field
would be considered.
This also fixes and error where the role users migration, on role
delete, would not actually fire due to mis-matching http body keys.
Looks like this has been an issue from the start. Added some testing to
cover. Fixes #2211.
Also converted phpdoc to typehints in many areas of the reviewed code
during the above.
Dan Brown [Tue, 4 Aug 2020 12:02:31 +0000 (13:02 +0100)]
Removed joint_permissions auto_increment id
Removed auto_incrementing id and set a primary key of the [role_id,
entity_type, entity_id, action] instead since this table could recieve a
lot of activity, especially when permission regeneration was automated,
leading to very high auto_increment counts which could max out the
integer limit.
Also updated some RolesTest comment endpoints to align with
recent route changes.
Dan Brown [Tue, 28 Jul 2020 17:19:18 +0000 (18:19 +0100)]
Updated some comment elements and standardised more JS
- Updated comment routes to be simpler.
- Updated comments JS to align better with updated component system.
- Documented available global JS functions/services.
- Removed redundant controller method.
- Added window.$events helpers for validation messages and
success/error.
- Updated JS events system to not be class based for simplicity.
- Added window.trans_plural method to handle pluralisation/replacements
where you already have the translation string itself.
Dan Brown [Tue, 28 Jul 2020 15:27:16 +0000 (16:27 +0100)]
Updated public-login redirect to check url
Direct links to the login pages for public instances could lead to a
redirect back to an external page upon login.
This adds a check to ensure the URL is a URL expected from the current
bookstack instance, or at least under the same domain.
Dan Brown [Tue, 28 Jul 2020 11:59:43 +0000 (12:59 +0100)]
Updated functionality for logging failed access
- Added testing to cover.
- Linked logging into Laravel's monolog logging system and made log
channel configurable.
- Updated env var names to be specific to login access.
- Added extra locations as to where failed logins would be captured.
Dan Brown [Tue, 28 Jul 2020 09:45:28 +0000 (10:45 +0100)]
Started attachment drag/drop
Currently fighting between sortable and tinymce mechanisms which prevent
this working due to the different events stopping the drop event while
needing the dragover for cursor placement.
Dan Brown [Sun, 26 Jul 2020 15:36:15 +0000 (16:36 +0100)]
Removed default anchor CSS filtering in dark mode
Due to causing content images to be rendered in unexpected ways.
- Also removed CSS filters from other image usage.
- Tweaked header CSS filtering to not be so aggressive.
- Forced WYSIWYG editor to be on its own layer since that would allow
massive larger performance increases in Safari, especially when using
dark mode.
Dan Brown [Tue, 30 Jun 2020 21:12:45 +0000 (22:12 +0100)]
Started migration of attachment manager from vue
- Created new dropzone component.
- Added standard component event system using custom DOM events.
- Added tabs component.
- Added ajax-delete-row component.
Dan Brown [Sat, 27 Jun 2020 22:56:01 +0000 (23:56 +0100)]
Moved overlay component, migrated code-editor & added features
- Moved Code-editor from vue to component.
- Updated popup code so it background click only hides if the click
originated on the same background. Clicks within the popup will no
longer cause it to hide.
- Added session-level history tracking to code editor.
Dan Brown [Sat, 27 Jun 2020 15:52:26 +0000 (16:52 +0100)]
Moved sass build out of webpack, updated npm deps
Moving sass out of webpack cleans the setup quite considerably and
brings a good speed improvement.
Made use of npm-run-all so the previous commands still run like before.
Dan Brown [Wed, 24 Jun 2020 19:38:08 +0000 (20:38 +0100)]
Started attempt at formalising component system used in BookStack
Added a document to try to define things.
Updated the loading so components are registed dynamically.
Added some standardised ways to reference other elems & define options
Dan Brown [Sat, 23 May 2020 11:56:31 +0000 (12:56 +0100)]
Removed failing URL test
- Was found that the test was not testing the actual situation anyway.
- A work-around in the request creation, within testing, just happened
to result in the desired outcome.
For reference: https://github.com/laravel/framework/pull/32345
Dan Brown [Mon, 27 Apr 2020 14:54:39 +0000 (15:54 +0100)]
Added auto-focus behaviour to page editor
- Will focus on title if the value of the field matches the default text
for the current user's language.
- Otherwise will focus on the editor body.
- Added and tested on both editors.
Dan Brown [Sun, 26 Apr 2020 11:13:00 +0000 (12:13 +0100)]
Fixed not shown existing-email warning on new ldap user
- Reduced the amount of different exceptions from LDAP attempt so they
can be handled more consistently.
- Added test to cover.
- Also cleaned up LDAP tests to reduce boilterplate mocks.
Dan Brown [Sun, 26 Apr 2020 08:26:41 +0000 (09:26 +0100)]
Updated WYSIWYG callout shortcut to handle child elems
- Will now search for a callout on/above the selected node rather than
only using the selected node.
- Issues previously where callout shortcut would not cycle if called
when child formatting was currently selected inside the callout.
Dan Brown [Sat, 25 Apr 2020 21:15:59 +0000 (22:15 +0100)]
Tweaked ListingResponseBuilder to help avoid future issues
- Updated so none of the method mutate the query throughout the function
so that the query can be handled in a sane way, Since we were already
encountering issues due to internal method call order.