Dan Brown [Tue, 24 Jan 2023 20:42:20 +0000 (20:42 +0000)]
Addressed fallback override cases found during testing
Had misalignment between query and usercan, The nuance between fallback
and entity-role permissions was not taken into account by the query
system. Now added with new test cases to cover.
Dan Brown [Tue, 24 Jan 2023 14:55:34 +0000 (14:55 +0000)]
Implemented alternate approach to current joint_permissions
Is a tweak upon the existing approach, mainly to store and query role
permission access in a way that allows muli-level states that may
override eachother. These states are represented in the new PermissionStatus
class.
This also simplifies how own permissions are stored and queried, to be
part of a single column.
Dan Brown [Sat, 21 Jan 2023 13:03:47 +0000 (13:03 +0000)]
Made adjustments to fit copied work into dev branch
Ported non-compatible elements, Now all tests passing apart from some
specific permission scenario tests which are probably correctly failing.
Updates some tests to better avoid messing environment state.
Dan Brown [Mon, 16 Jan 2023 16:54:53 +0000 (16:54 +0000)]
Fixed incorrect pluralisation for de_informal
Updated language system to only use initial part of locale for
translation pluralisation to better match the hard-coded logic of the
built-in MessageSelector. Extends and overrides Laravel's default for
this system.
Dan Brown [Fri, 16 Dec 2022 17:44:13 +0000 (17:44 +0000)]
Fixed not being able to remove all user roles
User roles would only be actioned if they existed in the form request,
hence removal of all roles would have no data to action upon.
This adds a placeholder 0-id role to ensure there is always role data to
send, even when no roles are selected. This field value is latter
filtered out.
Dan Brown [Mon, 28 Nov 2022 12:38:30 +0000 (12:38 +0000)]
Cleaned up dark mode styles inc. setting browser color scheme
Forces browser colorscheme based on BookStack color scheme, via
'color-scheme' css property.
Sets proper dark mode colors for some previously missed areas like
templates and attachment control buttons.
Also fixed search bar icon position for some search inputs.
Dan Brown [Wed, 23 Nov 2022 11:50:59 +0000 (11:50 +0000)]
Fixed OIDC handling when no JWKS 'use' prop exists
Now assume, based on OIDC discovery spec, that keys without 'use' are
'sig' keys. Should not affect existing use-cases since existance of such
keys would have throw exceptions in prev. versions of bookstack.
Dan Brown [Wed, 16 Nov 2022 15:46:41 +0000 (15:46 +0000)]
Replaced el.components mapping with component service weakmap
Old system was hard to track in terms of usage and it's application of
'components' properties directly to elements was shoddy.
This routes usage via the components service, with element-specific
component usage tracked via a local weakmap.
Updated existing found usages to use the new system.
Dan Brown [Mon, 14 Nov 2022 23:19:02 +0000 (23:19 +0000)]
Started refactor and alignment of component system
- Updates old components to newer format, removes legacy component
support.
- Makes component registration easier and less duplicated.
- Adds base component class to extend for better editor support.
- Aligns global window exposure usage and aligns with other service
names.
Dan Brown [Sat, 12 Nov 2022 15:10:14 +0000 (15:10 +0000)]
Updated email confirmation flow so confirmation is done via POST
To avoid non-user GET requests (Such as those from email scanners)
auto-triggering the confirm submission. Made auto-submit the form via
JavaScript in this extra added step with user-link backup to keep
existing user flow experience.
Dan Brown [Wed, 9 Nov 2022 19:30:08 +0000 (19:30 +0000)]
Aligned user preference endpoints in style and behaviour
Changes their endpoints and remove the user id from the URLs.
Simplifies list changes to share a single endpoint, which aligns it to
the behaviour of the existing sort preference endpoint.
Also added test to ensure user preferences are deleted on user delete.