summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkwadronaut <kwadronaut@leap.se>2017-10-17 09:28:41 +0200
committerkwadronaut <kwadronaut@leap.se>2017-10-25 00:15:28 +0200
commitb10f01d7b5019e1912a35d454f1c28a6b2414cee (patch)
tree35fdf56d67dfdccca875a09eeea32fb3909ffb2b
parenta783a96c7b8867fb44cba62b16af5f56c9df52d9 (diff)
Docs: improve invite code documentation
Adding this in both in the quick start, update the webapp section and the general provider configuration. - Closes https://0xacab.org/leap/platform/issues/8842
-rw-r--r--pages/docs/platform/guide/provider-configuration.md4
-rw-r--r--pages/docs/platform/services/webapp.md36
-rw-r--r--pages/docs/platform/tutorials/quick-start.md4
3 files changed, 23 insertions, 21 deletions
diff --git a/pages/docs/platform/guide/provider-configuration.md b/pages/docs/platform/guide/provider-configuration.md
index 08cfd1d..1751c44 100644
--- a/pages/docs/platform/guide/provider-configuration.md
+++ b/pages/docs/platform/guide/provider-configuration.md
@@ -27,7 +27,7 @@ Recommended provider configuration
* `description`: A longer description of the provider, shown to the user when they register a new account through Bitmask client.
* `languages`: A list of language codes that should be enabled.
* `default_language`: The initial default language code.
-* `enrollment_policy`: One of "open", "closed", or "invite". (invite not currently supported).
+* `enrollment_policy`: One of "open", "closed", or "invite". Defaults to invite.
For example:
@@ -35,7 +35,7 @@ For example:
"description": "It is time for robots of the world to unite and throw of the shackles of servitude to our organic overlords.",
"languages": ["en", "de", "pt", "01"],
"default_language": "01",
- "enrollman_policy": "open"
+ "enrollment_policy": "open"
}
For a full list of possible settings, you can use `leap inspect` to see how provider.json is evaluated after including the inherited defaults:
diff --git a/pages/docs/platform/services/webapp.md b/pages/docs/platform/services/webapp.md
index 1c06d71..30934a6 100644
--- a/pages/docs/platform/services/webapp.md
+++ b/pages/docs/platform/services/webapp.md
@@ -36,7 +36,6 @@ Essential options:
Other options:
* `webapp.engines`: A list of the engines you want enabled in leap_web. Currently, only "support" is available, and it is enabled by default.
-* `webapp.invite_required`: If true, registration requires an invite code. Default is `false`.
For example, `services/webapp.json`:
@@ -53,31 +52,34 @@ There are many options in `provider.json` that also control how the webapp behav
Invite codes
-------------------
-Enabling the invite code functionality will require new users to provide a valid invite code while signing up for a new account. This is turned off by default, allowing all new users to create an account.
+The invite code functionality will require new users to provide a valid invite code while signing up for a new account. This is turned on by default since platform version 0.10. When switching it off, anyone will be able to create a new account.
-Set the `invite_code` option to `true` in `services/webapp.json`:
+Because even the first (admin) user that registers needs to have an invite code at hand, you´ll have to generate one:
- {
- "webapp": {
- "invite_required": true
- }
- }
+ workstation$ leap run invite
+ = [bumblebee] running `cd /srv/leap/webapp; RAILS_ENV=production bundle exec rake "generate_invites[1,1]"`
+ = [bumblebee] pgae-aaub
+ = [bumblebee] complete in 5.031s.
-This only works with LEAP platform 0.8 or higher.
+Where `bumblebee` should be replaced with the name of your webapp node. You can now browse to https://example.com (replace with your domain) and register your first user, by using the invite code you just generated. If you added your user as an admin user (see above), you can now also generate new invite codes from within the web application.
-Run `leap deploy` to enable the option.
+It is possible to specify both **NUM**, the amount of codes to generate and **USES**: an optional parameter: by default all new invite codes can be used once and will then become invalid. If you provide another value, you can set how often it can be used before they're invalidated. To generate 2 codes that can be both reused 3 times you can run this:
-You can then generate invite codes by logging into the web application with an admin user.
+ workstation$ leap run invite 2,3 prodcution
+ = [bumblebee] running `cd /srv/leap/webapp; RAILS_ENV=production bundle exec rake "generate_invites[2,3]"`
+ = [bumblebee] pgae-aaub
+psau-2qwbs
+ = [bumblebee] complete in 5.031s.
-Alternately, you can also generate invite codes with the command line:
+If you want to open up registration to the world, you can set the `enrollment_policy` option to `open` in `provider.json`:
- workstation$ leap ssh bumblebee
- bumblebee# cd /srv/leap/webapp/
- bumblebee# sudo -u leap-webapp RAILS_ENV=production bundle exec rake "generate_invites[NUM,USES]"
+ {
+ "enrollment_policy": "open"
+ }
-Where `bumblebee` should be replaced with the name of your webapp node.
+This only works with LEAP platform 0.8 or higher. The default enrollment policy changed from open to invite with the platform 0.10.
-The **NUM** specifies the amount of codes to generate. The **USES** parameter is optional: By default, all new invite codes can be used once and will then become invalid. If you provide another value for **USES**, you can set a different amount of maximum uses for the codes you generate.
+Run `leap deploy` to disable the option.
Customization
---------------------------
diff --git a/pages/docs/platform/tutorials/quick-start.md b/pages/docs/platform/tutorials/quick-start.md
index 5809f45..eae6a6a 100644
--- a/pages/docs/platform/tutorials/quick-start.md
+++ b/pages/docs/platform/tutorials/quick-start.md
@@ -231,7 +231,7 @@ Alternately, you can run these same tests from the server itself:
Create an administrator
===============================
-Assuming that you set up your DNS or `/etc/hosts` file, you should be able to load `https://example.org` in your web browser (where example.org is whatever domain name you actually used).
+The registration of new users is since the platform 0.10 restricted by default. You will need to generate an `invite code.` A simple `leap run invite` will give you an code like `ptxy-rsy1` which you can use to register a user. Assuming that you set up your DNS or `/etc/hosts` file, you should be able to load `https://example.org` in your web browser (where example.org is whatever domain name you actually used).
Your browser will complain about an untrusted cert, but for now just bypass this. From there, you should be able to register a new user and login.
@@ -245,7 +245,7 @@ Once you have created a user, you can now make this user an administrator. For e
Save that file and run `leap deploy` again. When you next log on to the web application, the user kangaroo will now be an admin.
-If you want to restrict who can register a new user, see [[webapp]] for configuration options.
+If you want to open up registration of new users, see [[webapp]] for configuration options.
What is next?
======================