summaryrefslogtreecommitdiffstats
path: root/db/migrate/001_setup.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-07 09:04:37 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-02-07 09:04:37 +0000
commit84d8453cf03e623f5df24bd55ffbeadb521a108b (patch)
tree346e751b6b5ebe81d6b449b3a3ae573027aed5c4 /db/migrate/001_setup.rb
parent41e1758b005abbf02defd015a2002d4189075a7c (diff)
downloadredmine-84d8453cf03e623f5df24bd55ffbeadb521a108b.tar.gz
redmine-84d8453cf03e623f5df24bd55ffbeadb521a108b.zip
Default admin user may not be crated in Redmine 3.0 (#18804).
Patch by Ondřej Ezr. git-svn-id: http://svn.redmine.org/redmine/trunk@13968 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db/migrate/001_setup.rb')
-rw-r--r--db/migrate/001_setup.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/db/migrate/001_setup.rb b/db/migrate/001_setup.rb
index 3cea13591..1af42a783 100644
--- a/db/migrate/001_setup.rb
+++ b/db/migrate/001_setup.rb
@@ -288,14 +288,17 @@ class Setup < ActiveRecord::Migration
Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
# create default administrator account
- user = User.create :login => "admin",
- :hashed_password => "d033e22ae348aeb5660fc2140aec35850c4da997",
- :admin => true,
- :firstname => "Redmine",
- :lastname => "Admin",
- :mail => "admin@example.net",
- :mail_notification => true,
- :status => 1
+ user = User.new :firstname => "Redmine",
+ :lastname => "Admin",
+ :mail => "admin@example.net",
+ :mail_notification => 'all',
+ :status => 1
+ user.login = 'admin'
+ user.hashed_password = "d033e22ae348aeb5660fc2140aec35850c4da997"
+ user.admin = true
+ user.save
+
+
end
def self.down
n value='backport/43025/stable29'>backport/43025/stable29 Nextcloud server, a safe home for all your data: https://github.com/nextcloud/serverwww-data
aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller/UnsupportedBrowserController.php
blob: b8efe2539f1b1da06d6d0fe5eed8d754dc8fbd2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?php

declare(strict_types=1);

/**
 * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors
 * SPDX-License-Identifier: AGPL-3.0-or-later
 */

namespace OC\Core\Controller;

use OCP\AppFramework\Controller;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Response;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IRequest;
use OCP\Util;

#[OpenAPI(scope: OpenAPI::SCOPE_IGNORE)]
class UnsupportedBrowserController extends Controller {
	public function __construct(IRequest $request) {
		parent::__construct('core', $request);
	}

	/**
	 * @PublicPage
	 * @NoCSRFRequired
	 *
	 * @return Response
	 */
	#[FrontpageRoute(verb: 'GET', url: 'unsupported')]
	public function index(): Response {
		Util::addScript('core', 'unsupported-browser');
		Util::addStyle('core', 'icons');

		// not using RENDER_AS_ERROR as we need the JSConfigHelper for url generation
		return new TemplateResponse('core', 'unsupportedbrowser', [], TemplateResponse::RENDER_AS_GUEST);
	}
}