Skip to content
Merged
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
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{% doc %}
@param {object} object - The object to process
@param {string} type - The type identifier
@param {number} delay - Delay in minutes before processing
@param {number} max_attempts - Maximum number of retry attempts
@param {number} [delay] - Deprecated; set metadata.delay in the consumer file instead
@param {number} [max_attempts] - Deprecated; set metadata.max_attempts in the consumer file instead
{% enddoc %}
{% liquid
if delay > 0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% doc %}
@param {string} hook - The hook name without hook_ prefix
@param {object} params - Parameters to pass to the hook
@param {boolean} merge_to_object - If true, merge results into one object instead of collecting in an array
@param {object} [params] - Parameters to pass to the hook
@param {boolean} [merge_to_object] - If true, merge results into one object instead of collecting in an array
{% enddoc %}
{% liquid
if merge_to_object
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% doc %}
@param {string} error - The error flash message
@param {string} info - The info flash message
@param {string} notice - The notice flash message
@param {object} object - The object to process
@param {string} [error] - The error flash message
@param {string} [info] - The info flash message
@param {string} [notice] - The notice flash message
@param {object} [object] - The object to process
@param {string} [default] - The default value
@param {string} format - The response format
@param {string} [format] - The response format
@param {string} [url] - The URL to redirect to
{% enddoc %}
{% liquid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% doc %}
@param {string} hook - The hook name without hook_ prefix
@param {object} params - Parameters to pass to the hook
@param {boolean} merge_to_object - If true, merge results into one object instead of collecting in an array
@param {object} [params] - Parameters to pass to the hook
@param {boolean} [merge_to_object] - If true, merge results into one object instead of collecting in an array
{% enddoc %}
{% liquid
if merge_to_object
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@

assign user_invite_token = g.users.results.first.token

assign object = {}
assign object['email'] = email
assign object['user_id'] = user_id
assign object['sign_up_url'] = "https://" | append: app_host | append: "/user_invites/" | append: user_invite_id | append: "/edit" | append: "?token=" | append: user_invite_token
assign sign_up_url = "https://" | append: app_host | append: "/user_invites/" | append: user_invite_id | append: "/edit" | append: "?token=" | append: user_invite_token
assign object = { "email": email, "user_id": user_id, "sign_up_url": sign_up_url }

assign now_time = 'now' | to_time: 'UTC'
assign sent_at = now_time | strftime: "%Y-%m-%dT%H:%M:%S%Z"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
and a paginated list of past CSV imports.
Required: invite_csvs (search result), page (current page number), context
{% endcomment %}
{% comment %}theme_render_rc components are provided by the host app's theme, so the linter can never resolve them{% endcomment %}
{% # platformos-check-disable MissingPartial %}
{% liquid
assign unnamed_label = 'modules/user_invites/admin.invite_users.unnamed' | t
%}
Expand Down Expand Up @@ -50,9 +52,7 @@
if record.status == 'sent'
assign chip_variant = 'success'
endif
# platformos-check-disable MissingPartial
theme_render_rc 'components/molecules/chip', variant: chip_variant, content: record.status
# platformos-check-enable MissingPartial
%}
</td>
<td class="py-2">
Expand All @@ -71,9 +71,7 @@
assign url_params = null | hash_merge: page: ''
assign url_template = '/admin/community/invite_users{?page}'
assign pager_url = url_template | expand_url_template: url_params
# platformos-check-disable MissingPartial
theme_render_rc 'components/molecules/pagination', count: invite_csvs.total_pages, active: page, url: pager_url
# platformos-check-enable MissingPartial
endif
%}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@param [errors] {object} - per-field error messages
@param context {object} - request context (for authenticity_token)
{% enddoc %}
{% comment %}theme_render_rc components are provided by the host app's theme, so the linter can never resolve them{% endcomment %}
{% # platformos-check-disable MissingPartial %}
<div class="container">
<h2 class="pb-8 font-extrabold text-3xl">{{ 'modules/user_invites/user_invites.form.title' | t: site_name: site_name }}</h2>

Expand All @@ -30,18 +32,12 @@
assign label_params = null | hash_merge: content: field.label
assign field_params = null | hash_merge: validation: validation, input_params: input_params, label_params: label_params, classes: 'mb-6'

# platformos-check-disable MissingPartial
theme_render_rc 'components/molecules/formfield', params: field_params
# platformos-check-enable MissingPartial
%}
{% endfor %}

<fieldset class="mt-5">
{% liquid
# platformos-check-disable MissingPartial
theme_render_rc 'components/atoms/button', content: "Sign Up", type: 'submit'
# platformos-check-enable MissingPartial
%}
{% theme_render_rc 'components/atoms/button', content: "Sign Up", type: 'submit' %}
</fieldset>
</form>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{% liquid
assign data = {}
assign default_role = context.constants.USER_DEFAULT_ROLE
if default_role != blank
assign data[default_role] = []
endif

assign permissions = {
assign data = {
"anonymous": ["sessions.create", "users.register"],
"authenticated": ["sessions.destroy", "oauth.manage"],
"admin": ["admin_pages.view", "admin.users.manage", "users.impersonate"],
"member": ["profile.manage"],
"superadmin": ["users.impersonate_superadmin"]
}
assign data = data | hash_merge: permissions

assign default_role = context.constants.USER_DEFAULT_ROLE
if default_role != blank and data[default_role] == null
assign data[default_role] = []
endif

return data
%}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% doc %}
@param {string} email - The email address
@param {object} hook_params - Additional parameters to pass to hooks
@param {string} password - The password
@param {boolean} skip_otp - Whether to skip OTP verification
@param {string} user_id - The user ID (used when validate_password is false)
@param {boolean} validate_password - Whether to validate the password
@param {string} [email] - The email address; required unless validate_password is false
@param {object} [hook_params] - Additional parameters to pass to hooks
@param {string} [password] - The password; required unless validate_password is false
@param {boolean} [skip_otp] - Whether to skip OTP verification (default: false)
@param {string} [user_id] - The user ID; required when validate_password is false
@param {boolean} [validate_password] - Whether to validate the password (default: true)
{% enddoc %}
{% liquid
if validate_password == nil
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% doc %}
@param {string} email - The email address
@param {string} first_name - The first name
@param {object} hook_params - Additional parameters to pass to hooks
@param {object} [hook_params] - Additional parameters to pass to hooks
@param {string} last_name - The last name
@param {string} password - The password
@param roles - The roles to assign; a comma separated string or an array
@param [roles] - The roles to assign; a comma separated string or an array
{% enddoc %}
{% liquid
function object = 'modules/user/commands/user/create/build', first_name: first_name, last_name: last_name, email: email, password: password, hook_params: hook_params, roles: roles
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,20 @@
{% doc %}
@param {string} email - The email address
@param {string} first_name - The first name
@param {object} hook_params - Additional parameters to pass to hooks
@param {object} [hook_params] - Additional parameters to pass to hooks
@param {string} last_name - The last name
@param {string} password - The password
@param roles - The roles to assign; a comma separated string or an array
@param [roles] - The roles to assign; a comma separated string or an array
{% enddoc %}
{% assign object =
{
"first_name": first_name,
"last_name": last_name,
"email": email,
"password": password,
"hook_params": hook_params
"hook_params": hook_params,
"roles": roles
}
%}

{% assign object.roles = roles %}

{% return object %}
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
{% doc %}
@param {string} access_callback - Custom authorization callback path
@param {string} [access_callback] - Custom authorization callback path
@param {string} [anonymous_return_to] - URL to redirect anonymous users to
@param {string} do - The permission to check
@param {object} entity - The entity to check access against
@param {string} forbidden_partial - Custom partial to render for forbidden access
@param {boolean} redirect_anonymous_to_login - Whether to redirect anonymous users to login
@param {object} [entity] - The entity to check access against
@param {string} [forbidden_partial] - Custom partial to render for forbidden access
@param {boolean} [redirect_anonymous_to_login] - Whether to redirect anonymous users to login
@param {object} requester - The user profile requesting access
{% enddoc %}
{% liquid
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{% doc %}
@param {string} first_name - The first name
@param {string} id - The record ID
@param {string} last_name - The last name
@param {string} user_id - The user ID
@param {string} uuid - The UUID identifier
At least one of id, user_id, or uuid must be given.

@param {string} [first_name] - The first name
@param {string} [id] - The record ID
@param {string} [last_name] - The last name
@param {string} [user_id] - The user ID
@param {string} [uuid] - The UUID identifier
{% enddoc %}
{% liquid
if user_id == blank and id == blank and uuid == blank
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,16 @@
{% liquid
assign data = {}
assign default_role = context.constants.USER_DEFAULT_ROLE
if default_role != blank
assign data[default_role] = []
endif

assign permissions = {
assign data = {
"anonymous": ["sessions.create", "users.register"],
"authenticated": ["sessions.destroy", "oauth.manage"],
"admin": ["admin_pages.view", "admin.users.manage", "users.impersonate"],
"member": ["profile.manage"],
"superadmin": ["users.impersonate_superadmin"]
}
assign data = data | hash_merge: permissions

assign default_role = context.constants.USER_DEFAULT_ROLE
if default_role != blank and data[default_role] == null
assign data[default_role] = []
endif

return data
%}
Loading
Loading