-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
8 changed files
with
90 additions
and
39 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
FROM registry.cloudogu.com/official/base:3.14.3-1 | ||
|
||
LABEL NAME="official/redmine" \ | ||
VERSION="4.2.9-1" \ | ||
VERSION="4.2.9-2" \ | ||
maintainer="[email protected]" | ||
|
||
# This Dockerfile is based on https://github.com/docker-library/redmine/blob/master/4.0/alpine/Dockerfile | ||
|
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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
require 'optparse' | ||
|
||
module CreateAdminHelper | ||
@options = {} | ||
OptionParser.new do |opts| | ||
opts.banner = "Usage: get_setting.rb [options]" | ||
|
||
opts.on("-u", "--username USERNAME", "username") | ||
opts.on("-p", "--password PASSWORD", "password") | ||
end.parse!(into: @options) | ||
|
||
@options[:username] = "" if @options[:username].nil? | ||
|
||
def self.options | ||
@options | ||
end | ||
|
||
class ActiveSupport::HashWithIndifferentAccess | ||
def symbolize_keys! | ||
transform_keys! { |key| key.to_sym rescue key } | ||
end | ||
end | ||
end | ||
|
||
begin | ||
opts = CreateAdminHelper::options | ||
username = opts[:username] | ||
password = opts[:password] | ||
puts "Try to create user '%s'" % username | ||
user = User.new(:language => Setting.default_language, :mail_notification => Setting.default_notification_option, :admin => true) | ||
user.login = username | ||
user.password = password | ||
user.password_confirmation = password | ||
user.lastname = username | ||
user.firstname = username | ||
user.mail = "#{username}@#{username}.de" | ||
user.save! | ||
puts 'User saved successfully.' | ||
rescue Exception => error | ||
puts '================================================' | ||
puts error.message | ||
puts '================================================' | ||
raise 'User was not saved.' | ||
end |
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 |
---|---|---|
@@ -0,0 +1,36 @@ | ||
require 'optparse' | ||
|
||
module RemoveUserHelper | ||
@options = {} | ||
OptionParser.new do |opts| | ||
opts.banner = "Usage: get_setting.rb [options]" | ||
|
||
opts.on("-u", "--username USERNAME", "username") | ||
end.parse!(into: @options) | ||
|
||
@options[:username] = "" if @options[:username].nil? | ||
|
||
def self.options | ||
@options | ||
end | ||
|
||
class ActiveSupport::HashWithIndifferentAccess | ||
def symbolize_keys! | ||
transform_keys! { |key| key.to_sym rescue key } | ||
end | ||
end | ||
end | ||
|
||
begin | ||
opts = RemoveUserHelper::options | ||
puts "Try to remove user %s" % opts[:username] | ||
user = User.where(login: opts[:username]).first | ||
puts 'User did not exist' if user.nil? | ||
user.destroy unless user.nil? | ||
puts 'User removed successfully.' unless user.nil? | ||
rescue Exception => error | ||
puts '=====================================================' | ||
puts error.message | ||
puts '=====================================================' | ||
puts 'User remove failed.' | ||
end |
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