Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pos-module-user/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

All notable changes to this project will be documented in this file. Dates are displayed in UTC.

## v5.3.0

* Every page now sets `layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"` instead of leaving `layout:` unset. This lets a consuming app or module (for example a theme that depends on this module) restyle every built-in page - `/sessions/new`, `/users/new`, `/passwords/*`, 2FA, OAuth - by setting a single `modules/user/LAYOUT` constant, without needing to override any of this module's page files. Falls back to the Instance's actual `default_layout` (via `context.config`, itself unreleased at the time of writing) once available, and to a literal `'application'` on engines that predate `context.config` - existing behavior is unchanged unless `modules/user/LAYOUT` is explicitly set.

## v5.1.1

* Fix: remove theme_render for can_do_or_unauthorized command
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
method: post
slug: authentication_links
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function object = 'modules/user/commands/authentication_links/create', email: context.params.authentication_link.email, host: context.location.host, hcaptcha_params: context.params, valid_for: null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
method: get
slug: oauth/:provider/callback
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
# platformos-check-disable ConvertIncludeToRender
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
method: post
slug: oauth/:provider/start
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---

{% liquid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
slug: oauth/:provider/unassign
method: delete
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_user = 'modules/user/queries/user/current'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
slug: passwords
method: post
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
assign input = context.params.password
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
if context.session.reset_password_session_user_id == blank
function user = 'modules/user/helpers/user_from_temporary_token', token: context.params.token, email: context.params.email
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
---
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% render 'modules/user/passwords/reset', context: context, values: null, errors: null %}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
slug: profiles/2fa
method: post
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
slug: profiles/2fa/delete
method: post
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
if current_profile.user.id == null or current_profile.otp_configured != true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
if current_profile.user.id == null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
method: post
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
method: post
slug: sessions
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
slug: sessions
method: delete
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
slug: sessions/impersonations/:user_id
method: post
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
slug: sessions/impersonations
method: delete
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
if context.session.original_user_id == blank
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
method: post
slug: users
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
if current_profile.user == null
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
---
slug: users/email/edit
method: put
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
---
layout: "{{ context.constants['modules/user/LAYOUT'] | default: context.config.default_layout | default: 'application' }}"
---
{% liquid
function current_profile = 'modules/user/helpers/current_profile'

Expand Down
2 changes: 1 addition & 1 deletion pos-module-user/pos-module.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"machine_name": "user",
"version": "5.2.11",
"version": "5.3.0",
"name": "User",
"dependencies": {
"core": "^2.1.9",
Expand Down
Loading