-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
743f62d
commit a48cd19
Showing
9 changed files
with
39 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -173,14 +173,16 @@ OPENPROJECT_SEED_ADMIN_USER_NAME="OpenProject Admin" # Name to assign to that us | |
OPENPROJECT_SEED_ADMIN_USER_MAIL="[email protected]" # Email attribute to assign to that user. Note that in packaged installations, a wizard step will assign this variable as well. | ||
``` | ||
|
||
Optionally, you can also completely disable the creation of such a user. | ||
Optionally, you can also lock the admin user that gets created right away. This is useful when you have an LDAP or SSO integration set up and you want to prevent the admin user from logging in. | ||
|
||
```shell | ||
|
||
> [!WARNING] | ||
> With the admin user seeding disabled, you need to have an LDAP or SSO integration set up through environment variables. | ||
> Otherwise, you will not be able to retain access to the system. | ||
|
||
```shell | ||
OPENPROJECT_SEED_ADMIN_USER_DISABLED="true" | ||
OPENPROJECT_SEED_ADMIN_USER_LOCKED="true" | ||
``` | ||
|
||
### Seeding LDAP connections | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,18 +39,6 @@ | |
expect { seeder.seed! }.to change { User.admin.count }.by(1) | ||
end | ||
|
||
context "when skipped with OPENPROJECT_SEED_ADMIN_USER_ENABLED=false", | ||
:settings_reset, | ||
with_env: { | ||
OPENPROJECT_SEED_ADMIN_USER_ENABLED: "false" | ||
} do | ||
it "skips the creation" do | ||
reset(:seed_admin_user_enabled) | ||
|
||
expect { seeder.seed! }.not_to change { User.admin.count } | ||
end | ||
end | ||
|
||
context "when providing admin user seed variables", | ||
:settings_reset, | ||
with_env: { | ||
|
@@ -68,6 +56,7 @@ | |
seeder.seed! | ||
|
||
admin = User.admin.last | ||
expect(admin).to be_active | ||
expect(admin.firstname).to eq "foo" | ||
expect(admin.lastname).to eq "bar" | ||
expect(admin.mail).to eq "[email protected]" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters