1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/gitlab_ynh.git synced 2024-09-03 18:36:35 +02:00

add only_ldap option and upgrade to 1.6.0

This commit is contained in:
Pierre Bourré 2018-12-24 16:25:32 +01:00
parent f75e98a162
commit f8010caeb4
3 changed files with 18 additions and 8 deletions

View file

@ -2,7 +2,7 @@
"name": "Gitlab",
"id": "gitlab",
"packaging_format": 1,
"version": "1.5.3~ynh1",
"version": "1.6.0~ynh1",
"description": {
"en": "Gitlab for Yunohost.",
"fr": "Gitlab pour YunoHost."
@ -59,9 +59,16 @@
"fr": "Est-ce une application publique ?"
},
"default": true
},
{
"name": "only_use_ldap",
"type": "boolean",
"ask": {
"en": "Use only Yunohost account to sign in?",
"fr": "Utiliser seulement les comptes Yunohost pour se connecter ?"
},
"default": true
}
]
}
}

View file

@ -22,6 +22,7 @@ source ./_common.sh
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
is_public=$YNH_APP_ARG_IS_PUBLIC
only_use_ldap=$YNH_APP_ARG_IS_PUBLIC
admin=$YNH_APP_ARG_ADMIN
#=================================================
@ -49,6 +50,7 @@ ynh_user_exists "$admin" \
ynh_app_setting_set $app admin $admin
ynh_app_setting_set $app path_url $path_url
ynh_app_setting_set $app is_public $is_public
ynh_app_setting_set $app only_use_ldap $only_use_ldap
#=================================================
# STANDARD MODIFICATIONS
@ -94,7 +96,7 @@ setup_source $architecture
#=================================================
# SPECIFIC SETUP
#=================================================
# GETTING ADMIN INFO AND ADD AS A GITLAB USER
# GETTING ADMIN INFO AND ADD AS A GITLAB USER AND CONFIGURE SIGN IN SYSTEM
#=================================================
mailadmin=$(ynh_user_get_info $admin mail)
@ -104,7 +106,8 @@ echo "newuser = User.new({ \"email\"=>'$mailadmin', \"username\"=>'$admin', \"na
newuser.admin = true
newuser.confirmed_at = Time.now
newuser.confirmation_token = nil
newuser.save" | sudo gitlab-rails console
newuser.save
ApplicationSetting.last.update_attributes(password_authentication_enabled_for_web: $only_use_ldap, signup_enabled: $only_use_ldap)" | sudo gitlab-rails console
#=================================================
# RESTART TO TAKE INTO ACCOUNT CHANGES

View file

@ -1,5 +1,5 @@
gitlab_version="11.5.3"
gitlab_version="11.6.0"
gitlab_x86_64_source_sha256="fdbea3e92eb1f613897659e99b20660d64524eaf5b1cd57a323cd6f61c573e7f"
gitlab_x86_64_source_sha256="040ac5917d71c45b3fbdeccbeaf2e7b3181fcce0ed9ca65ac68d3d15081b8b02"
gitlab_arm_source_sha256="81d37736442be80d687b52299604ef38bc4000b7545b241094b7f5a027c9fac4"
gitlab_arm_source_sha256="18d385af2a59fb37c6282298ccb7bbbf091d8ff39fbcde581226e35d5f3792dc"