Skip to content

feat: add custom error message on signups disabled page - #11959

Merged
mtojek merged 17 commits into
mainfrom
11679-custom-error-page
Feb 1, 2024
Merged

feat: add custom error message on signups disabled page#11959
mtojek merged 17 commits into
mainfrom
11679-custom-error-page

Conversation

@mtojek

@mtojek mtojek commented Jan 31, 2024

Copy link
Copy Markdown
Member

Fixes: #11679

Once Coder administrators sets this custom error message:

export CODER_OIDC_SIGNUPS_DISABLED_TEXT='**Coder** is in early access mode. To request access, fill out this [form](https://internal.form.com).'

It will be rendered as follows:
Screenshot 2024-02-01 at 13 00 45

@mtojek mtojek self-assigned this Jan 31, 2024
@mtojek mtojek changed the title feat: custom error message on signups disabled page feat: add custom error message on signups disabled page Jan 31, 2024
@mtojek
mtojek requested review from bpmct and matifali January 31, 2024 15:26
@mtojek
mtojek marked this pull request as ready for review January 31, 2024 15:26
@matifali

Copy link
Copy Markdown
Member

Thanks @mtojek. I think having a minimal markdown that can render links or make them clickable should be done.

@mtojek

mtojek commented Feb 1, 2024

Copy link
Copy Markdown
Member Author

Alright, I'm going to expand it!

@mtojek

mtojek commented Feb 1, 2024

Copy link
Copy Markdown
Member Author

@matifali Ok, please let me know your thoughts! Markdown can be rendered now.

@mtojek
mtojek requested a review from johnstcn February 1, 2024 12:15

@johnstcn johnstcn left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only possible concern here is a bad actor injecting malicious HTML into the page. However in order to do this they have to get access to modify Coder's deployment values, and if this is the case then the deployment should already be considered compromised.

However, it's no harm to add some tests to validate that basic code injection is handled properly.

Comment thread coderd/parameter/renderer_test.go
Comment thread cli/testdata/coder_server_--help.golden Outdated
@mtojek
mtojek merged commit ad8e0db into main Feb 1, 2024
@mtojek
mtojek deleted the 11679-custom-error-page branch February 1, 2024 17:01
@github-actions github-actions Bot locked and limited conversation to collaborators Feb 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Customizable error page, when OIDC signup is disabled.

3 participants