Merge branch 'master' of github.com:gogits/gogs

This commit is contained in:
Unknwon 2015-07-09 11:15:08 +08:00
commit b60fd3aaad
55 changed files with 769 additions and 321 deletions

View file

@ -16,7 +16,7 @@ github.com/gogits/go-gogs-client = commit:92e76d616a
github.com/lib/pq = commit:30ed2200d7
github.com/macaron-contrib/binding = commit:548a793679
github.com/macaron-contrib/cache = commit:928d5c35cd
github.com/macaron-contrib/captcha = commit:fbb8b1ebb5
github.com/macaron-contrib/captcha =
github.com/macaron-contrib/csrf = commit:98ddf5a710
github.com/macaron-contrib/i18n = commit:da2b19e90b
github.com/macaron-contrib/oauth2 = commit:8f394c3629
@ -24,6 +24,7 @@ github.com/macaron-contrib/session = commit:31e841d95c
github.com/macaron-contrib/toolbox = commit:acbfe36e16
github.com/mattn/go-sqlite3 = commit:e28cd440fa
github.com/microcosm-cc/bluemonday = commit:fcd0f5074e
github.com/msteinert/pam =
github.com/nfnt/resize = commit:53e9ca890b
github.com/russross/blackfriday = commit:6928e11ecd
github.com/shurcooL/go = commit:bc30a0bd33

View file

@ -6,11 +6,13 @@ go:
- 1.4
- tip
sudo: false
before_install:
- sudo apt-get update -qq
- sudo apt-get install -y libpam-dev
script: go build -v
notifications:
email:
- u@gogs.io
slack: gophercn:o5pSanyTeNhnfYc3QnG0X7Wx
slack: gophercn:o5pSanyTeNhnfYc3QnG0X7Wx

View file

@ -13,7 +13,7 @@ Gogs (Go Git Service) is a painless self-hosted Git service.
- Due to testing purpose, data of [try.gogs.io](https://try.gogs.io) has been reset in **Jan 28, 2015** and will reset multiple times after. Please do **NOT** put your important data on the site.
- The demo site [try.gogs.io](https://try.gogs.io) is running under `develop` branch.
- You **MUST** read [CONTRIBUTING.md](CONTRIBUTING.md) before you start filing an issue or making a Pull Request, and **MUST** discuss with us on [Gitter](https://gitter.im/gogits/gogs) for UI changes and feature Pull Reuqests, otherwise it's high possibilities that we are not going to merge it.
- You **MUST** read [CONTRIBUTING.md](CONTRIBUTING.md) before you start filing an issue or making a Pull Request, and **MUST** discuss with us on [Gitter](https://gitter.im/gogits/gogs) for UI changes and feature Pull Requests, otherwise it's high possibilities that we are not going to merge it.
- If you think there are vulnerabilities in the project, please talk privately to **u@gogs.io**. Thanks!
#### Other language version

View file

@ -102,7 +102,7 @@ func runServ(c *cli.Context) {
cmd := os.Getenv("SSH_ORIGINAL_COMMAND")
if cmd == "" {
println("Hi", user.Name, "! You've successfully authenticated, but Gogs does not provide shell access.")
fmt.Printf("Hi, %s! You've successfully authenticated, but Gogs does not provide shell access.\n", user.Name)
if user.IsAdmin {
println("If this is unexpected, please log in with password and setup Gogs under another user.")
}

View file

@ -104,7 +104,11 @@ SUBJECT = %(APP_NAME)s
; Gmail: smtp.gmail.com:587
; QQ: smtp.qq.com:25
; Note, if the port ends with "465", SMTPS will be used. Using STARTTLS on port 587 is recommended per RFC 6409. If the server supports STARTTLS it will always be used.
HOST =
HOST =
; Disable HELO operation when hostname are different.
DISABLE_HELO =
; Custom hostname for HELO operation, default is from system.
HELO_HOSTNAME =
; Do not verify the certificate of the server. Only use this for self-signed certificates
SKIP_VERIFY =
; Use client certificate

View file

@ -39,6 +39,13 @@ issues=Issues
cancel=Abbrechen
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=Installation
title=Installation für erstmaligen Start
@ -83,7 +90,7 @@ invalid_repo_path=Repository Root-Verzeichnis ist ungültig: %v
run_user_not_match=Der ausführende Benutzer ist nicht der aktuelle Benutzer: %s -> %s
save_config_failed=Versuche die Konfiguration zu speichern ist fehlgeschlagen: %v
invalid_admin_setting=Admin-Konto Einstellungen sind ungültig: %v
install_success=Herzlich Willkommen! Wir sind froh, dass du dich für Gogs entschieden hast. Hab viel Vergnügen damit.
install_success=Herzlich Willkommen! Wir sind froh, dass du dich für Gogs entschieden hast. Wir wünschen viel Vergnügen damit.
[home]
uname_holder=Benutzername oder E-Mail
@ -150,26 +157,23 @@ org_name_been_taken=Organisationsname ist bereits vergeben.
team_name_been_taken=Teamname ist bereits vergeben.
email_been_used=E-Mail-Adresse wird bereits verwendet.
ssh_key_been_used=SSH-Schlüsselname wird bereits verwendet.
illegal_username=Benutzername enthält ungültige Zeichen.
illegal_repo_name=Repository-Name enthält ungültige Zeichen.
illegal_org_name=Organisationsname enthält ungültige Zeichen.
illegal_team_name=Teamname enthält ungültige Zeichen.
username_password_incorrect=Benutzername oder Passwort ist nicht korrekt.
enterred_invalid_repo_name=Bitte stelle sicher, dass der eingegeben Repository-Name richtig ist.
enterred_invalid_owner_name=Bitte stelle sicher, dass der eingegeben Besitzername richtig ist.
enterred_invalid_repo_name=Bitte stelle sicher, dass der eingegebene Repository-Name richtig ist.
enterred_invalid_owner_name=Bitte stelle sicher, dass der eingegebene Besitzername richtig ist.
enterred_invalid_password=Bitte stelle sicher, dass das eingegebene Passwort richtig ist.
user_not_exist=Angegebener Benutzer existiert nicht.
last_org_owner=Der zu entfernende Benutzer ist der letzte Teambesitzer. Es muss einen anderen Besitzer geben.
last_org_owner=Der zu entfernende Benutzer ist der letzte Besitzer einer Organisation. Diese müssen zuerst gelöscht oder übertragen werden.
invalid_ssh_key=Leider sind wir nicht in der Lage, deinen SSH-Schlüssel zu überprüfen: %s
unable_verify_ssh_key=Gogs kann deinen SSH-Schlüssel nicht verifizieren, nimmt aber an, dass er gültig ist. Bitte stelle dies selbst sicher.
auth_failed=Authentifizierung fehlgeschlagen: %v
still_own_repo=Dein Konto besitzt noch Repositorys. Diese müssen zuerst gelöscht oder übertragen werden.
still_own_repo=Dein Konto besitzt noch Repositories. Diese müssen zuerst gelöscht oder übertragen werden.
still_has_org=Du bist noch Mitglied einer Organisation, bitte lösche zunächst diese Mitgliedschaft.
org_still_own_repo=Diese Organisation besitzt noch Repositorys. Diese müssen zuerst gelöscht oder übertragen werden.
still_own_user=Diese Authentifizierung wird noch von einigen Benutzern genutzt. Entferne diese zuvor und lösche erneut.
still_own_user=Diese Authentifizierung wird noch von einigen Benutzern genutzt, diese müssen zuerst gelöscht oder deren Authentifizierung geändert werden.
target_branch_not_exist=Ziel-Branch existiert nicht
@ -183,6 +187,9 @@ followers=Folgen
starred=Markiert
following=Folgt
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=Profil
password=Passwort
@ -227,6 +234,7 @@ primary_email=Als primäre Adresse verwenden
delete_email=Löschen
add_new_email=Neue E-Mail-Adresse hinzufügen
add_email=E-Mail-Adresse hinzufügen
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=Deine neue E-Mail-Adresse wurde erfolgreich hinzugefügt.
manage_ssh_keys=SSH-Schlüssel verwalten
@ -282,6 +290,9 @@ create_repo=Repository erstellen
default_branch=Standard-Branch
mirror_interval=Spiegel-Intervall (in Stunden)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=Authorisierung benötigt
migrate_type=Migrationstyp
migrate_type_helper=Dieses Repository wird ein <span class="label label-blue label-radius">Spiegel</span>
@ -339,7 +350,7 @@ settings.update_settings=Aktualisierungseinstellungen
settings.change_reponame=Name des Repositories geändert
settings.change_reponame_desc=Repository-Name wurde geändert, möchtest du fortfahren? Dies beeinträchtigt sämtliche Links, die dieses Repository betreffen.
settings.transfer=Besitz übertragen
settings.transfer_desc=Übertrage dieses Repository einem anderen Benutzer oder einer Organisation.
settings.transfer_desc=Übertrage dieses Repository einem anderen Benutzer oder einer Organisation in der du Admin-Rechte hast.
settings.new_owner_has_same_repo=Neuer Eigentümer hat bereits ein Repository mit dem gleichen Namen.
settings.delete=Repository löschen
settings.delete_desc=Wenn dieses Repository gelöscht ist, gibt es keinen Weg zurück. Sei dir sicher!
@ -354,14 +365,14 @@ settings.add_collaborator_success=Mitarbeiter hinzugefügt
settings.remove_collaborator_success=Mitarbeiter entfernt
settings.user_is_org_member=Benutzer ist ein Organisationsmitglied und kann nicht als Mitarbeiter hinzugefügt werden.
settings.add_webhook=Webhook hinzufügen
settings.hooks_desc=Webhooks erlauben es externe Dienste zu informieren, wenn etwas bestimmtes in deinem Repository passiert. GoGS sendet dann eine POST-Request an alle angegebenen URLs. Erfahre mehr in unserem <a target="_blank" href="%s">Webhooks Guide</a>.
settings.hooks_desc=Webhooks erlauben es dir, externe Dienste zu informieren, wenn etwas bestimmtes in deinem Repository passiert. Gogs sendet dann einen POST-Request an alle angegebenen URLs. Erfahre mehr in unserem <a target="_blank" href="%s">Webhooks Guide</a>.
settings.githooks_desc=Git-Hooks werden von Git selbst bereitgestellt. Du kannst die Dateien der unterstützten Hooks in der Liste unten bearbeiten, um eigene Operationen einzubinden.
settings.githook_edit_desc=Wenn ein Hook nicht aktiv ist, wird der Standardinhalt benutzt. Lasse den Inhalt leer, um den Hook zu deaktivieren.
settings.githook_name=Hook-Name
settings.githook_content=Hook-Inhalt
settings.update_githook=Aktualisiere Hook
settings.remove_hook_success=Webhook entfernt
settings.add_webhook_desc=GoGS sendet einen <code>POST</code>-Request an die unten stehende URL mit Details aller abonnierten Ereignisse. Du kannst auch angeben, welches Datenformat du erhalten willst (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Mehr Informationen findest du im <a target="_blank" href="%s">Webhooks Guide</a>.
settings.add_webhook_desc=Gogs sendet einen <code>POST</code>-Request an die unten stehende URL mit Details aller abonnierten Ereignisse. Du kannst auch angeben, welches Datenformat du erhalten willst (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). Mehr Informationen findest du im <a target="_blank" href="%s">Webhooks Guide</a>.
settings.payload_url=Payload-URL
settings.content_type=Inhaltstyp
settings.secret=Secret
@ -432,6 +443,9 @@ team_name_helper=Verwende diesen Namen, um dich auf dieses Team zu beziehen.
team_desc_helper=Was hat es mit diesem Team auf sich?
team_permission_desc=Welche Berechtigungsstufe soll das Team haben?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=Einstellungen
settings.options=Optionen
settings.full_name=Vollständiger Name
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=Alle Repository-Archive löschen
dashboard.delete_repo_archives_success=Alle Repositoriy-Archive wurden gelöscht.
dashboard.git_gc_repos=Führe Garbage Collection auf Repositories aus
dashboard.git_gc_repos_success=Garbage Collection wurde auf allen Repositories erfolgreich ausgeführt.
dashboard.resync_all_sshkeys=Überschreibe '.ssh/autorized_key' Datei (Warnung: Keys, die nicht zu Gogs gehören werden verloren gehen)
dashboard.resync_all_sshkeys=Überschreibe '.ssh/authorized_keys' Datei (Warnung: Keys, die nicht zu Gogs gehören werden verloren gehen)
dashboard.resync_all_sshkeys_success=Alle öffentlichen Keys sind erfolgreich neu geschrieben worden.
dashboard.resync_all_update_hooks=Überschreibe alle Hooks der Repositories (benötigt, wenn sich der Pfad in der Konfiguration ändert)
dashboard.resync_all_update_hooks_success=Die Hooks aller Repositories sind erfolgreich neu geschrieben worden.
@ -567,7 +581,7 @@ users.is_admin=Dieses Konto hat Administratorrechte
users.allow_git_hook=Dieses Konto ist berechtigt, Git-Hooks zu erstellen
users.update_profile=Kontoprofil aktualisieren
users.delete_account=Dieses Konto löschen
users.still_own_repo=Dieses Konto besitzt noch Repositorys. Diese müssen zuerst gelöscht oder übertragen werden.
users.still_own_repo=Dieses Konto besitzt noch Repositories. Diese müssen zuerst gelöscht oder übertragen werden.
users.still_has_org=Dieses Konto ist noch Mitglied einer Organisation, bitte entferne diese Mitgliedschaft zuerst.
orgs.org_manage_panel=Organisationenverwaltung

View file

@ -157,9 +157,6 @@ org_name_been_taken = Organization name has been already taken.
team_name_been_taken = Team name has been already taken.
email_been_used = E-mail address has been already used.
ssh_key_been_used = Public key name or content has been used.
illegal_username = Your username contains illegal characters.
illegal_repo_name = Repository name contains illegal characters.
illegal_org_name = Organization name contains illegal characters.
illegal_team_name = Team name contains illegal characters.
username_password_incorrect = Username or password is not correct.
enterred_invalid_repo_name = Please make sure that the repository name you entered is correct.
@ -190,6 +187,9 @@ followers = Followers
starred = Starred
following = Following
form.name_reserved = Username '%s' is reserved.
form.name_pattern_not_allowed = Username pattern '%s' is not allowed.
[settings]
profile = Profile
password = Password
@ -290,6 +290,9 @@ create_repo = Create Repository
default_branch = Default Branch
mirror_interval = Mirror Interval (hour)
form.name_reserved = Repository name '%s' is reserved.
form.name_pattern_not_allowed = Repository name pattern '%s' is not allowed.
need_auth = Need Authorization
migrate_type = Migration Type
migrate_type_helper = This repository will be a <span class="label label-blue label-radius">mirror</span>
@ -440,6 +443,9 @@ team_name_helper = You'll use this name to mention this team in conversations.
team_desc_helper = What is this team all about?
team_permission_desc = What permission level should this team have?
form.name_reserved = Organization name '%s' is reserved.
form.name_pattern_not_allowed = Organization name pattern '%s' is not allowed.
settings = Settings
settings.options = Options
settings.full_name = Full Name
@ -449,7 +455,7 @@ settings.update_settings = Update Settings
settings.change_orgname = Organization Name Changed
settings.change_orgname_desc = Organization name has been changed. This will affect how links relate to the organization. Do you want to continue?
settings.update_setting_success = Organization settings were successfully updated.
settings.delete = Delete Organization
settings.delete = Delete Organization
settings.delete_account = Delete This Organization
settings.delete_prompt = The organization will be permanently removed, and this <strong>CANNOT</strong> be undone!
settings.confirm_delete_account = Confirm Deletion
@ -522,7 +528,7 @@ dashboard.delete_repo_archives = Delete all repositories archives
dashboard.delete_repo_archives_success = All repositories archives have been deleted successfully.
dashboard.git_gc_repos = Do garbage collection on repositories
dashboard.git_gc_repos_success = All repositories have done garbage collection successfully.
dashboard.resync_all_sshkeys = Rewrite '.ssh/autorized_key' file (caution: non-Gogs keys will be lost)
dashboard.resync_all_sshkeys = Rewrite '.ssh/authorized_keys' file (caution: non-Gogs keys will be lost)
dashboard.resync_all_sshkeys_success = All public keys have been rewritten successfully.
dashboard.resync_all_update_hooks = Rewrite all update hook of repositories (needed when custom config path is changed)
dashboard.resync_all_update_hooks_success = All repositories' update hook have been rewritten successfully.
@ -613,6 +619,7 @@ auths.smtp_auth = SMTP Authorization Type
auths.smtphost = SMTP Host
auths.smtpport = SMTP Port
auths.enable_tls = Enable TLS Encryption
auths.pam_service_name = PAM Service Name
auths.enable_auto_register = Enable Auto Registration
auths.tips = Tips
auths.edit = Edit Authorization Setting
@ -661,6 +668,7 @@ config.deliver_timeout = Deliver Timeout
config.skip_tls_verify = Skip TLS Verify
config.mailer_config = Mailer Configuration
config.mailer_enabled = Enabled
config.mailer_disable_helo = Disable HELO
config.mailer_name = Name
config.mailer_host = Host
config.mailer_user = User

View file

@ -39,6 +39,13 @@ issues=Publicaciones
cancel=Cancelar
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=Instalación
title=Pasos de la instalación por primera vez
@ -113,7 +120,7 @@ active_your_account=Activa tu cuenta
resent_limit_prompt=Lo sentimos, estás solicitando el reenvío del mail de activación con demasiada frecuencia. Por favor, espera 3 minutos.
has_unconfirmed_mail=Hola %s, tu correo electrónico (<b>%s</b>) no está confirmado. Si no has recibido un correo de confirmación o necesitas que lo enviemos de nuevo, por favor, haz click en el siguiente botón.
resend_mail=Haz click aquí para reenviar tu correo electrónico de activación
email_not_associate=Esta dirección de correo electrónico no esta asociada a cuenta alguna.
email_not_associate=Esta dirección de correo electrónico no esta asociada a ninguna cuenta.
send_reset_mail=Haga clic aquí para (re)enviar el correo para el restablecimiento de la contraseña
reset_password=Restablecer su contraseña
invalid_code=Lo sentimos, su código de confirmación ha expirado o no es valido.
@ -150,9 +157,6 @@ org_name_been_taken=Ya existe una organización con este nombre.
team_name_been_taken=Ya existe un equipo con este nombre.
email_been_used=Esta dirección de correo electrónico ya está en uso.
ssh_key_been_used=Este nombre de clave pública ya está en uso.
illegal_username=Tu nombre de usuario contiene caracteres inválidos.
illegal_repo_name=El nombre del repositorio contiene caracteres inválidos.
illegal_org_name=El nombre de la organización contiene caracteres inválidos.
illegal_team_name=El nombre del equipo contiene caracteres inválidos.
username_password_incorrect=Nombre de usuario o contraseña incorrectos.
enterred_invalid_repo_name=Por favor, asegúrate de que has introducido correctamente el nombre del repositorio.
@ -183,6 +187,9 @@ followers=Seguidores
starred=Destacados
following=Siguiendo
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=Perfil
password=Contraseña
@ -227,6 +234,7 @@ primary_email=Marcar como principal
delete_email=Eliminar
add_new_email=Añadir nueva dirección de correo electrónico
add_email=Añadir correo electrónico
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=Tu nuevo correo electrónico se ha añadido correctamente.
manage_ssh_keys=Gestionar Claves SSH
@ -282,6 +290,9 @@ create_repo=Crear Repositorio
default_branch=Rama por defecto
mirror_interval=Intervalo de mirror(en horas)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=Requiere Autorización
migrate_type=Tipo de Migración
migrate_type_helper=Este repositorio será un <span class="label label-blue label-radius">Mirror</span>
@ -432,6 +443,9 @@ team_name_helper=Utiliza este nombre para mencionar a este equipo en las convers
team_desc_helper=¿En qué consiste este equipo?
team_permission_desc=¿Qué nivel de permisos debería tener este equipo?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=Configuración
settings.options=Opciones
settings.full_name=Nombre Completo
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=Eliminar todos los archivos de repositorios
dashboard.delete_repo_archives_success=Todos los archivos de repositorios se han eliminado correctamente.
dashboard.git_gc_repos=Ejecutar la recolección de basura en los repositorios
dashboard.git_gc_repos_success=Todos los repositorios han ejecutado correctamente el recolector de basuras.
dashboard.resync_all_sshkeys=Reescribir el fichero '.ssh/authorized_key'(atención: se perderán las claves que no pertenezcan a Gogs)
dashboard.resync_all_sshkeys=Reescribir el fichero '.ssh/authorized_keys'(atención: se perderán las claves que no pertenezcan a Gogs)
dashboard.resync_all_sshkeys_success=Todas las claves públicas se han reescrito correctamente.
dashboard.resync_all_update_hooks=Reescribir todos los hooks de actualización de los repositorios (necesario cuando se modifica la ruta de configuración personalizada)
dashboard.resync_all_update_hooks_success=Todos los hooks de actualización de los repositorios se han reescrito correctamente.

View file

@ -39,6 +39,13 @@ issues=Problèmes
cancel=Annuler
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=Installation
title=Instructions de Première Installation
@ -150,12 +157,9 @@ org_name_been_taken=Nom d'organisation déjà pris.
team_name_been_taken=Nom d'équipe déjà pris.
email_been_used=Adresse e-mail déjà utilisée.
ssh_key_been_used=Le nom de la clé publique a déjà servi.
illegal_username=Le nom d'utilisateur contient des caractères interdits.
illegal_repo_name=Le nom du Référentiel contient des caractères interdits.
illegal_org_name=Le nom de l'organisation contient des caractères interdits.
illegal_team_name=Le nom de l'équipe contient des caractères interdits.
username_password_incorrect=Nom d'utilisateur ou mot de passe incorrect.
enterred_invalid_repo_name=Veuillez vérifier que le nom saisi du Référentiel soit correct.
enterred_invalid_repo_name=Veuillez vérifier que le nom saisi du dépôt soit correct.
enterred_invalid_owner_name=Veuillez vérifier que le nom du propriétaire saisi soit correct.
enterred_invalid_password=Veuillez vérifier que le mot de passe saisi soit correct.
user_not_exist=Cet utilisateur n'existe pas.
@ -165,7 +169,7 @@ invalid_ssh_key=Désolé, impossible de valider votre clé SSH : %s
unable_verify_ssh_key=Gogs n'a pu vérifier la validité de votre clé SSH, même si nous partons du principe qu'elle le soit. Cela-dit, veuillez vous en assurer.
auth_failed=Échec d'authentification : %s
still_own_repo=Votre compte comporte toujours des propriétés de Référentiel. Vous devez d'abord les supprimer ou les transférer.
still_own_repo=Votre compte comporte toujours des propriétés du dépôt. Vous devez d'abord les supprimer ou les transférer.
still_has_org=Votre compte a toujours membres de l'organisation, vous avez à gauche ou supprimez tout d'abord.
org_still_own_repo=Cette organisation comporte toujours des propriétés de Référentiel. Vous devez d'abord les supprimer ou les transférer.
@ -183,6 +187,9 @@ followers=Abonnés
starred=Votés
following=Abonnements
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=Profil
password=Mot de Passe
@ -227,6 +234,7 @@ primary_email=Définir comme principale
delete_email=Supprimer
add_new_email=Ajouter une nouvelle adresse courriel
add_email=Ajouter un courriel
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=Votre courriel a été ajouté avec succès.
manage_ssh_keys=Gérer les clés SSH
@ -266,12 +274,12 @@ delete_account_desc=Ce compte sera supprimé définitivement. Voulez-vous contin
[repo]
owner=Propriétaire
repo_name=Nom du Référentiel
repo_name_helper=Idéalement, le nom d'un Référentiel devrait être court, mémorable et <strong>unique</strong>.
repo_name_helper=Idéalement, le nom d'un dépot devrait être court, mémorable et <strong>unique</strong>.
visibility=Visibilité
visiblity_helper=Ce Référentiel est <span class="label label-red label-radius">Privé</span>
fork_repo=Référentiel d'Embranchement
fork_from=Embranchement de
fork_visiblity_helper=Un Référentiel d'embranchement ne peut pas changer sa visiblité
fork_visiblity_helper=Un dépôt scindé ne peut pas changer sa visiblité
repo_desc=Description
repo_lang=Langue
repo_lang_helper=Sélectionner un fichier .gitignore
@ -282,9 +290,12 @@ create_repo=Créer un Référentiel
default_branch=Branche par défaut
mirror_interval=Intervalle du miroir (heure)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=Nécessite une Autorisation
migrate_type=Type de Migration
migrate_type_helper=Ce Référentiel sera un <span class="label label-blue label-radius">Miroir</span>
migrate_type_helper=Ce dépôt sera un <span class="label label-blue label-radius">Miroir</span>
migrate_repo=Migrer le Référentiel
migrate.clone_address=Adresse du clone
migrate.invalid_local_path=Chemin local non valide, non existant ou n'étant pas un dossier.
@ -337,10 +348,10 @@ settings.danger_zone=Zone de danger
settings.site=Site officiel
settings.update_settings=Valider
settings.change_reponame=Référentiel renommé
settings.change_reponame_desc=Le Référentiel a été renommé. Cela affecte tous les liens relatifs à ce Référentiel. Continuer ?
settings.change_reponame_desc=Le dépôt a été renommé. Cela affecte tous les liens relatifs à ce dépôt. Continuer ?
settings.transfer=Transférer les propriétés
settings.transfer_desc=Transfère ce Référentiel à un autre utilisateur ou organisation dont vous possédez des droits d'administrateur.
settings.new_owner_has_same_repo=Le nouveau propriétaire a déjà un Référentiel nommé ainsi.
settings.transfer_desc=Transfèrer ce dépôt à un autre utilisateur ou une organisation dont vous possédez des droits d'administrateur.
settings.new_owner_has_same_repo=Le nouveau propriétaire a déjà un dépôt nommé ainsi.
settings.delete=Supprimer ce Référentiel
settings.delete_desc=Attention, action irréversible. Soyez sûre de vous.
settings.transfer_notices=<p>- Vous perdrez l'accès si le nouveau propriétaire est un utilisateur individuel.</p><p>- Vous garderez l'accès si le nouveau propriétaire est une organisation et que vous en faites partie.</p>
@ -432,6 +443,9 @@ team_name_helper=Ce nom sera utilisé pour mentionner l'équipe dans les convers
team_desc_helper=Présentation de l'équipe
team_permission_desc=Quel niveau d'accès cette équipe devrait-elle posséder ?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=Paramètres
settings.options=Options
settings.full_name=Non Complet
@ -477,7 +491,7 @@ teams.update_settings=Valider
teams.delete_team=Supprimer cette Équipe
teams.add_team_member=Ajouter un Membre
teams.delete_team_title=Suppression de l'équipe
teams.delete_team_desc=Cette équipe sera supprimée. Les membres pourraient perdre leurs accès à certains Référentiels.
teams.delete_team_desc=Cette équipe sera supprimée. Les membres pourraient perdre leurs accès à certains dépôts.
teams.delete_team_success=Équipe supprimée avec succès.
teams.read_permission_desc=Cette équipe permet l'accès en <strong>lecture</strong> : les membres peuvent voir et dupliquer ses Référentiels.
teams.write_permission_desc=Cette équipe permet l'accès en <strong>écriture</strong> : les membres peuvent participer à ses Référentiels.
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=Supprimer toutes les archives de référentiels
dashboard.delete_repo_archives_success=Toutes les archives de référentiels ont été supprimés avec succès.
dashboard.git_gc_repos=Collecter les déchets des référentiels
dashboard.git_gc_repos_success=Tous les référentiels ont effectué la collecte avec succès.
dashboard.resync_all_sshkeys=Ré-écrire le fichier '.ssh/autorized_key' (attention : les clés hors-Gogs vont être perdues)
dashboard.resync_all_sshkeys=Ré-écrire le fichier '.ssh/authorized_keys' (attention : les clés hors-Gogs vont être perdues)
dashboard.resync_all_sshkeys_success=Toutes les clés publiques ont été ré-écrites avec succès.
dashboard.resync_all_update_hooks=Ré-écrire tous les hooks de mises à jour des dépôts (requis quand le chemin de la configuration personnalisé est modifié)
dashboard.resync_all_update_hooks_success=Tous les hooks de mises à jour des dépôts ont été ré-écris avec succès.
@ -567,7 +581,7 @@ users.is_admin=Ce compte possède un niveau d'accès administrateur
users.allow_git_hook=Ce compte dispose des autorisations pour créer des crochets de Git
users.update_profile=Mettre le profil à jour
users.delete_account=Supprimer ce Compte
users.still_own_repo=Ce compte comporte toujours des propriétés de Référentiel. Vous devez d'abord les supprimer ou les transférer.
users.still_own_repo=Ce compte possède toujours des dépôts. Vous devez d'abord les supprimer ou les transférer.
users.still_has_org=Ce compte a toujours membres de l'organisation, vous avez à gauche ou supprimez tout d'abord.
orgs.org_manage_panel=Gestion des Organisations

View file

@ -1,4 +1,4 @@
app_desc=Go言語で実装したセルフホストGitサー
app_desc=Go言語で実装したセルフホストGitサービス
home=ホーム
dashboard=ダッシュボード
@ -39,6 +39,13 @@ issues=課題
cancel=キャンセル
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=インストール
title=初回実行のインストール手順
@ -150,9 +157,6 @@ org_name_been_taken=組織名は既に使用されています。
team_name_been_taken=チーム名は既に使用されています。
email_been_used=電子メール アドレスは既に使用されています。
ssh_key_been_used=パブリック キー名が使用されています。
illegal_username=あなたのユーザ名に無効な文字が含まれます。
illegal_repo_name=リポジトリ名には無効な文字が含まれています。
illegal_org_name=組織名に無効な文字が含まれています。
illegal_team_name=チーム名に無効な文字が含まれています。
username_password_incorrect=ユーザー名またはパスワードが正しくありません。
enterred_invalid_repo_name=入力したリポジトリの名前が正しいかどうかを確認してください。
@ -183,6 +187,9 @@ followers=フォロワー
starred=スター
following=フォロー
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=プロフィール
password=パスワード
@ -227,6 +234,7 @@ primary_email=プライマリに設定
delete_email=削除
add_new_email=新しいe-mailアドレスを追加
add_email=電子メールを追加します。
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=新しいe-mail アドレスが追加されました。
manage_ssh_keys=SSH キーを管理
@ -282,6 +290,9 @@ create_repo=リポジトリを作成
default_branch=デフォルトのブランチ
mirror_interval=ミラー 間隔(時)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=認証が必要
migrate_type=マイグレーションの種類
migrate_type_helper=このリポジトリは <span class="label label-blue label-radius"> ミラー</span> になります
@ -432,6 +443,9 @@ team_name_helper=会話の時、この名前を使用しチーム名を表明し
team_desc_helper=このチームに関する全ての情報は?
team_permission_desc=このチームに必要な権限レベルは?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=設定
settings.options=オプション
settings.full_name=フルネーム
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=リポジトリのすべてのアーカイブを
dashboard.delete_repo_archives_success=リポジトリのすべてのアーカイブが正常に削除されました。
dashboard.git_gc_repos=リポジトリでのガベージコレクションを実行します。
dashboard.git_gc_repos_success=すべてのリポジトリは正常にガベージ コレクションを行いました。
dashboard.resync_all_sshkeys='.ssh/ autorized_key' ファイルを再生成します。警告Gogsキー以外は失われます
dashboard.resync_all_sshkeys='.ssh/ authorized_keys' ファイルを再生成します。警告Gogsキー以外は失われます
dashboard.resync_all_sshkeys_success=すべての公開鍵が正常に書き換えられました。
dashboard.resync_all_update_hooks=リポジトリの update フックをすべて再更新する(カスタムの設定パスが変更されたときに必要)
dashboard.resync_all_update_hooks_success=リポジトリの update フックがすべて正常に再更新されました。

View file

@ -39,6 +39,13 @@ issues=Problēmas
cancel=Atcelt
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=Instalācija
title=Instalācijas soļi pirmo reizi palaižot
@ -150,9 +157,6 @@ org_name_been_taken=Organizācijas nosaukums ir jau aizņemts.
team_name_been_taken=Komandas nosaukums ir jau aizņemts.
email_been_used=E-pasta adrese jau tiek izmantota.
ssh_key_been_used=Publiskās atslēgas nosaukums jau tiek izmantos.
illegal_username=Jūsu lietotājvārds satur neatļautas rakstzīmes.
illegal_repo_name=Krātuves nosaukums satur neatļautas rakstzīmes.
illegal_org_name=Organizācijas nosaukums satur neatļautas rakstzīmes.
illegal_team_name=Grupas nosaukums satur neatļautas rakstzīmes.
username_password_incorrect=Lietotājvārds vai parole nav pareiza.
enterred_invalid_repo_name=Lūdzu, pārliecinieties, vai ievadītā repozitorija nosaukums ir pareizs.
@ -183,6 +187,9 @@ followers=Sekotāji
starred=Atzīmēti ar zvaigznīti
following=Seko
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=Profils
password=Parole
@ -227,6 +234,7 @@ primary_email=Iestatīt kā primāro
delete_email=Dzēst
add_new_email=Pievienot jaunu e-pasta adresi
add_email=Pievienot e-pastu
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=Jūsu jaunā e-pasta adrese tika veiksmīgi pievienota.
manage_ssh_keys=Pārvaldīt SSH atslēgas
@ -282,6 +290,9 @@ create_repo=Izveidot repozitoriju
default_branch=Noklusējuma atzars
mirror_interval=Spoguļošanas intervāls (stundās)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=Nepieciešama autorizācija
migrate_type=Migrācijas veids
migrate_type_helper=Šis repozitorijs būs <span class="label label-blue label-radius">Spoguļots</span>
@ -432,6 +443,9 @@ team_name_helper=Šo nosaukumu varēs izmantot, lai pieminētu komandu sarunās.
team_desc_helper=Komandas apraksts
team_permission_desc=Kādām tiesībām šai komandai būtu jābūt?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=Iestatījumi
settings.options=Opcijas
settings.full_name=Pilns vārds, uzvārds
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=Dzēst visu repozitoriju arhīvus
dashboard.delete_repo_archives_success=Visu repozitoriju arhīvi tika veiksmīgi izdzēsti.
dashboard.git_gc_repos=Veikt repozitoriju datu sakārtošānu (git gc)
dashboard.git_gc_repos_success=Datu sakārtošana visiem repozitorijiem veiksmīgi pabeigta.
dashboard.resync_all_sshkeys=Pārrakstīt '.ssh/authorized_key' failu (brīdinājums: ne-Git atslēgas tiks pazaudētas)
dashboard.resync_all_sshkeys=Pārrakstīt '.ssh/authorized_keys' failu (brīdinājums: ne-Git atslēgas tiks pazaudētas)
dashboard.resync_all_sshkeys_success=Visas publiskās atslēgas tika veiksmīgi pārrakstītas.
dashboard.resync_all_update_hooks=Pārrakstīt visu repozitoriju izmaiņu āķus (nepieciešams, ja tiek mainīta konfigurācijas faila atrašanās vieta)
dashboard.resync_all_update_hooks_success=Visu repozitoriju izmaiņu āķi tika veiksmīgi pārrakstīti.

View file

@ -1,4 +1,4 @@
app_desc=Een pijnloze self-hosted Git-dienst geschreven in Go
app_desc=Een eenvoudige zelfgehoste Git service geschreven in Go
home=Huis
dashboard=Dashboard
@ -39,6 +39,13 @@ issues=Kwesties
cancel=Annuleer
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=Installatie
title=Installatiestappen voor de eerste keer opstarten
@ -150,9 +157,6 @@ org_name_been_taken=Organisatie naam is al in gebruik.
team_name_been_taken=Team naam is al in gebruik.
email_been_used=e-mailadres is al in gebruik.
ssh_key_been_used=Openbare sleutel naam is al in gebruik.
illegal_username=Gebruikersnaam bevat illegale karakters.
illegal_repo_name=Repositorie naam bevat illegale karakters.
illegal_org_name=Organisatie naam bevat illegale karakters.
illegal_team_name=Team naam bevat illegale karakters.
username_password_incorrect=Gebruikersnaam of wachtwoord is niet correct.
enterred_invalid_repo_name=U heeft een onjuiste repositorie naam ingevoerd.
@ -183,6 +187,9 @@ followers=Volgers
starred=Sterren
following=Volgt
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=Profiel
password=Wachtwoord
@ -227,6 +234,7 @@ primary_email=Instellen als primair
delete_email=Verwijder
add_new_email=Nieuw e-mailadres toevoegen
add_email=E-mailadres toevoegen
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=Het e-mailadres was toegevoegd.
manage_ssh_keys=Beheer SSH sleutels
@ -282,12 +290,15 @@ create_repo=Nieuwe Repositorie
default_branch=Standaard branch
mirror_interval=Mirror interval(uur)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=Autorisatie vereist
migrate_type=Migratie type
migrate_type_helper=Deze repositorie zal een <span class="label label-blue label-radius">mirror</span> worden
migrate_repo=Migreer repositorie
migrate.clone_address=Clone Address
migrate.invalid_local_path=Invalid local path, it does not exist or not a directory.
migrate.clone_address=Clone adres
migrate.invalid_local_path=Ongeldig lokaal pad, het pad bestaat niet of het is geen map.
copy_link=Kopieer
click_to_copy=Kopieer link naar plakbord
@ -432,6 +443,9 @@ team_name_helper=U gebruikt deze naam om dit team te vermelden in conversaties.
team_desc_helper=Waar gaat dit team doen?
team_permission_desc=Welke privileges zou dit team moeten hebben?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=Instellingen
settings.options=Opties
settings.full_name=Volledige naam
@ -595,10 +609,10 @@ auths.domain=Domein
auths.host=Host
auths.port=Poort
auths.base_dn=Base DN
auths.attribute_username=Username attribute
auths.attribute_name=First name attribute
auths.attribute_surname=Surname attribute
auths.attribute_mail=E-mail attribute
auths.attribute_username=Gebruikersnaam attribuut
auths.attribute_name=Voornaam attribuut
auths.attribute_surname=Achternaam attribuut
auths.attribute_mail=E-mail attribuut
auths.filter=Zoek filter
auths.ms_ad_sa=MS Ad SA
auths.smtp_auth=SMTP authenticatietype

View file

@ -39,6 +39,13 @@ issues=Problemy
cancel=Anuluj
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=Instalacja
title=Kroki instalacyjne dla pierwszego uruchomienia
@ -150,9 +157,6 @@ org_name_been_taken=Nazwa organizacji jest już zajęta.
team_name_been_taken=Nazwa zespołu jest już zajęta.
email_been_used=Adres e-mail jest już zarejestrowany.
ssh_key_been_used=Nazwa klucza publicznego jest już używana.
illegal_username=Twoja nazwa użytkownika zawiera niedozwolone znaki.
illegal_repo_name=Nazwa repozytorium zawiera niedozwolone znaki.
illegal_org_name=Nazwa organizacji zawiera niedozwolone znaki.
illegal_team_name=Nazwa zespołu zawiera niedozwolone znaki.
username_password_incorrect=Nazwa użytkownika lub hasło nie jest prawidłowe.
enterred_invalid_repo_name=Upewnij się, że wprowadzona nazwa repozytorium jest poprawna.
@ -183,6 +187,9 @@ followers=Obserwujący
starred=Polubionych
following=Obserwowani
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=Profil
password=Hasło
@ -227,6 +234,7 @@ primary_email=Ustaw jako podstawowy
delete_email=Usuń
add_new_email=Dodaj nowy e-mail
add_email=Dodaj e-mail
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=Twój nowy e-mail został dodany pomyślnie.
manage_ssh_keys=Zarządzaj kluczami SSH
@ -282,6 +290,9 @@ create_repo=Utwórz repozytorium
default_branch=Domyślna gałąź
mirror_interval=Odświeżanie mirrorów (godziny)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=Wymaga autoryzacji
migrate_type=Typ migracji
migrate_type_helper=Repozytorium będzie <span class="label label-blue label-radius">mirrorem</span>
@ -354,9 +365,9 @@ settings.add_collaborator_success=Został dodany nowy współpracownik.
settings.remove_collaborator_success=Współpracownik został usunięty.
settings.user_is_org_member=Użytkownik jest członkiem organizacji, który nie może być dodany jako współpracownik.
settings.add_webhook=Dodaj Webhooka
settings.hooks_desc=Webhooks allow external services to be notified when certain events happen on Gogs. When the specified events happen, we'll send a POST request to each of the URLs you provide. Learn more in our <a target="_blank" href="%s">Webhooks Guide</a>.
settings.githooks_desc=Git Hooks are powered by Git itself, you can edit files of supported hooks in the list below to apply custom operations.
settings.githook_edit_desc=If hook is not active, sample content will be presented. Leave content to be blank will disable this hook.
settings.hooks_desc=Webhooks are much like basic HTTP POST event triggers. Whenever something occurs in Gogs, we will handle the notification to the target host you specify. Learn more in this <a target="_blank" href="%s">Webhooks Guide</a>.
settings.githooks_desc=Git Hooks are powered by Git itself, you can edit files of supported hooks in the list below to perform custom operations.
settings.githook_edit_desc=If the hook is inactive, sample content will be presented. Leaving content to an empty value will disable this hook.
settings.githook_name=Nazwa skryptu
settings.githook_content=Treść skryptu
settings.update_githook=Zaktualizuj skrypt
@ -432,6 +443,9 @@ team_name_helper=Będziesz używał tej nazwy do wywoływania tego zespołu w dy
team_desc_helper=Czym zajmuje się ten zespół?
team_permission_desc=Jaki poziom uprawnień powinien mieć ten zespół?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=Ustawienia
settings.options=Opcje
settings.full_name=Imię i Nazwisko
@ -439,11 +453,11 @@ settings.website=Strona
settings.location=Lolalizacja
settings.update_settings=Aktualizuj ustawienia
settings.change_orgname=Zmieniono nazwę organizacji
settings.change_orgname_desc=Organization name has been changed, do you want to continue? This will affect all links relate to this organization.
settings.update_setting_success=Organization setting has been updated successfully.
settings.change_orgname_desc=Organization name has been changed. This will affect how links relate to the organization. Do you want to continue?
settings.update_setting_success=Organization settings were successfully updated.
settings.delete=Usuń Organizację
settings.delete_account=Usuń tą organizację
settings.delete_prompt=The operation will delete this organization permanently, and <strong>CANNOT</strong> be undone!
settings.delete_prompt=The organization will be permanently removed, and this <strong>CANNOT</strong> be undone!
settings.confirm_delete_account=Potwierdź usunięcie
settings.delete_org_title=Usunięcie organizacji
settings.delete_org_desc=This organization is going to be deleted permanently, do you want to continue?
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=Usuń wszystkie archiwa repozytoriów
dashboard.delete_repo_archives_success=Pomyślnie usunięto wszystkie archiwa repozytoriów.
dashboard.git_gc_repos=Usuń śmieci z repozytoriów
dashboard.git_gc_repos_success=All repositories have done garbage collection successfully.
dashboard.resync_all_sshkeys=Przeładuj klucze publiczne w pliku '.ssh/autorized_key' (uwaga: klucze poza Gogs zostaną usunięte)
dashboard.resync_all_sshkeys=Przeładuj klucze publiczne w pliku '.ssh/authorized_keys' (uwaga: klucze poza Gogs zostaną usunięte)
dashboard.resync_all_sshkeys_success=Przeładowanie kluczy publicznych zakończyło się sukcesem.
dashboard.resync_all_update_hooks=Rewrite all update hook of repositories (needed when custom config path is changed)
dashboard.resync_all_update_hooks_success=All repositories' update hook have been rewritten successfully.

View file

@ -39,6 +39,13 @@ issues=Problemas
cancel=Cancelar
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=Instalação
title=Etapas de instalação para Primeira Execução
@ -150,9 +157,6 @@ org_name_been_taken=Nome da organização já foi tomado.
team_name_been_taken=Nome da equipe já foi tomado.
email_been_used=Endereço de e-mail já foi usado.
ssh_key_been_used=Nome da chave pública foi usado.
illegal_username=Seu nome de usuário contém caracteres ilegais.
illegal_repo_name=Nome do repositório contém caracteres ilegais.
illegal_org_name=Nome da organização contém caracteres ilegais.
illegal_team_name=O nome da equipe contém caracteres ilegais.
username_password_incorrect=Usuário ou senha incorretos.
enterred_invalid_repo_name=Por favor certifique-se que informou o nome do repositório corretamente.
@ -183,6 +187,9 @@ followers=Seguidores
starred=Marcado
following=Seguindo
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=Perfil
password=Senha
@ -227,6 +234,7 @@ primary_email=Definir como principal
delete_email=Deletar
add_new_email=Adicionar novo endereço de e-mail
add_email=Adicionar e-mail
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=Seu novo endereço de E-mail foi adicionado com sucesso.
manage_ssh_keys=Gerenciar Chaves SSH
@ -282,6 +290,9 @@ create_repo=Criar Repositório
default_branch=Ramo padrão
mirror_interval=Intervalo de Espelho (hora)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=Precisa de Autorização
migrate_type=Tipo de Migração
migrate_type_helper=Este repositório será um <span class="label label-blue label-radius">Espelho</span>
@ -432,6 +443,9 @@ team_name_helper=Você usará este nome para mencionar esta equipe em conversas.
team_desc_helper=Do que trata essa equipe?
team_permission_desc=Que nível de permissão esta equipe deve ter?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=Configurações
settings.options=Opções
settings.full_name=Nome Completo
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=Excluir todos os arquivos dos repositórios
dashboard.delete_repo_archives_success=Todos os arquivos dos repositórios foram excluídos com sucesso.
dashboard.git_gc_repos=Fazer coleta de lixo nos repositórios
dashboard.git_gc_repos_success=Em todos repositórios, a coleta de lixo foi realizada com sucesso.
dashboard.resync_all_sshkeys=Reescrever o arquivo '.ssh/autorized_key' (atenção: chaves que não sejam do Gogs serão perdidas)
dashboard.resync_all_sshkeys=Reescrever o arquivo '.ssh/authorized_keys' (atenção: chaves que não sejam do Gogs serão perdidas)
dashboard.resync_all_sshkeys_success=Todas as chaves públicas foram reescritas com sucesso.
dashboard.resync_all_update_hooks=Reescrever todos os hooks de atualização dos repositórios (necessário quando o caminho de configuração customizado é alterado)
dashboard.resync_all_update_hooks_success=Os hooks de atualização de todos os repositórios foram reescritos com sucesso.

View file

@ -39,6 +39,13 @@ issues=Вопросы
cancel=Отмена
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=Установка
title=Установочные шаги для первого запуска
@ -128,7 +135,7 @@ Password=Пароль
Retype=Введите пароль еще раз
SSHTitle=Имя SSH ключа
HttpsUrl=URL HTTPS
PayloadUrl=Payload URL
PayloadUrl=URL обработчика
TeamName=Название команды
AuthName=Имя авторизации
AdminEmail=Электронная почта администратора
@ -150,9 +157,6 @@ org_name_been_taken=Название организации было уже пр
team_name_been_taken=Название команды было уже принято.
email_been_used=Адрес электронной почты уже используется.
ssh_key_been_used=Имя открытого ключа уже используется.
illegal_username=Ваше имя пользователя содержит недопустимые символы.
illegal_repo_name=Имя репозитория содержит недопустимые знаки.
illegal_org_name=Название организации содержит недопустимые знаки.
illegal_team_name=Имя группы содержит недопустимые знаки.
username_password_incorrect=Имя пользователя или пароль не правильный.
enterred_invalid_repo_name=Пожалуйста, убедитесь, что введенно правильное имя хранилища.
@ -183,6 +187,9 @@ followers=Подписчики
starred=Избранное
following=Подписан
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=Профиль
password=Пароль
@ -227,6 +234,7 @@ primary_email=Установить как основной
delete_email=Удалить
add_new_email=Добавить новый адрес электронной почты
add_email=Добавить электронную почту
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=Новый адрес электронной почты успешно добавлен.
manage_ssh_keys=Управление SSH ключами
@ -282,6 +290,9 @@ create_repo=Создать репозиторий
default_branch=Ветка по умолчанию
mirror_interval=Интервал зеркалирования (час)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=Требуется авторизация
migrate_type=Тип миграции
migrate_type_helper=Этот репозиторий будет <span class="label label-blue label-radius">зеркалом</span>
@ -355,20 +366,20 @@ settings.remove_collaborator_success=Соавтор был удален.
settings.user_is_org_member=Пользователь является членом организации, члены которой не могут быть добавлены в качестве соавтора.
settings.add_webhook=Добавить Webhook
settings.hooks_desc=Webhooks позволяют внешним службам получать уведомления при возникновении определенных событий на Gogs. При возникновении указанных событий мы отправим запрос POST на каждый заданный вами URL. Узнать больше можно в нашем <a target="_blank" href="%s">Руководстве по Webhooks</a>.
settings.githooks_desc=Git Hooks are powered by Git itself, you can edit files of supported hooks in the list below to apply custom operations.
settings.githook_edit_desc=If hook is not active, sample content will be presented. Leave content to be blank will disable this hook.
settings.githooks_desc=Git Hooks are powered by Git itself, you can edit files of supported hooks in the list below to perform custom operations.
settings.githook_edit_desc=If the hook is inactive, sample content will be presented. Leaving content to an empty value will disable this hook.
settings.githook_name=Название Hook'a
settings.githook_content=Перехватить содержание
settings.update_githook=Обновить Hook
settings.remove_hook_success=Webhook has been removed.
settings.add_webhook_desc=Well send a <code>POST</code> request to the URL below with details of any subscribed events. You can also specify which data format you'd like to receive (JSON, <code>x-www-form-urlencoded</code>, <em>etc</em>). More information can be found in <a target="_blank" href="%s">Webhooks Guide</a>.
settings.payload_url=Payload URL
settings.remove_hook_success=Webhook удален.
settings.add_webhook_desc=Мы отправим запрос <code>POST</code> на указанный ниже URL с информацией о событиях. Можно также указать формат, в котором вы бы хотели получить данные (JSON, <code>x-www-form-urlencoded</code>, <em>и т.д.</em>). Дополнительную информацию можно найти в <a target="_blank" href="%s">Руководстве по Webhook</a>.
settings.payload_url=URL обработчика
settings.content_type=Тип содержимого
settings.secret=Secret
settings.event_desc=Which events would you like to trigger this webhook?
settings.event_desc=На какие события этот webhook должен срабатывать?
settings.event_push_only=Просто <code>push</code> событие.
settings.active=Активен
settings.active_helper=We will deliver event details when this hook is triggered.
settings.active_helper=Details regarding the event which triggered the hook will be delivered as well.
settings.add_hook_success=New webhook has been added.
settings.update_webhook=Update Webhook
settings.update_hook_success=Webhook has been updated.
@ -407,7 +418,7 @@ release.preview=Предварительный просмотр
release.content_placeholder=Напишите что-нибудь
release.loading=Загрузка...
release.prerelease_desc=Это предварительный релиз
release.prerelease_helper=Well point out that this release is identified as non-production ready.
release.prerelease_helper=Well point out that this release is not production-ready.
release.publish=Опубликовать релиз
release.save_draft=Сохранить черновик
release.edit_release=Редактировать релиз
@ -432,6 +443,9 @@ team_name_helper=Вы будете использовать это имя для
team_desc_helper=What is this team all about?
team_permission_desc=Какой уровень разрешений должен быть у этой команды?
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=Настройки
settings.options=Опции
settings.full_name=Полное имя
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=Удаление всех архивов репо
dashboard.delete_repo_archives_success=Все архивы репозиториев были успешно удалены.
dashboard.git_gc_repos=Выполнить сборку мусора на репозиториях
dashboard.git_gc_repos_success=Сборка мусора на всех репозиториях успешно выполнена.
dashboard.resync_all_sshkeys=Переписать файл «.ssh/autorized_key» (осторожно: не Gogs ключи будут утеряны)
dashboard.resync_all_sshkeys=Переписать файл «.ssh/authorized_keys» (осторожно: не Gogs ключи будут утеряны)
dashboard.resync_all_sshkeys_success=Были успешно переписаны все открытые ключи.
dashboard.resync_all_update_hooks=Rewrite all update hook of repositories (needed when custom config path is changed)
dashboard.resync_all_update_hooks_success=All repositories' update hook have been rewritten successfully.
@ -568,7 +582,7 @@ users.allow_git_hook=Пользователь имеет право создат
users.update_profile=Обновить профиль учетной записи
users.delete_account=Удалить эту учетную запись
users.still_own_repo=На вашем аккаунте все еще остается как минимум один репозиторий, сначала вам нужно удалить или передать его.
users.still_has_org=This account still have membership of organization, you have to left or delete them first.
users.still_has_org=This account still has membership in at least one organization, you have to leave or delete the organizations first.
orgs.org_manage_panel=Управление группами
orgs.name=Имя

View file

@ -39,6 +39,13 @@ issues=工单管理
cancel=取消
[search]
search=搜索...
repository=仓库
user=用户
issue=工单
code=代码
[install]
install=安装页面
title=首次运行安装程序
@ -150,9 +157,6 @@ org_name_been_taken=组织名称已经被占用。
team_name_been_taken=团队名称已经被占用。
email_been_used=邮箱地址已经被使用。
ssh_key_been_used=SSH 密钥已经被使用。
illegal_username=您的用户名包含非法字符。
illegal_repo_name=仓库名称包含非法字符。
illegal_org_name=组织名称包含非法字符。
illegal_team_name=团队名称包含非法字符。
username_password_incorrect=用户名或密码不正确。
enterred_invalid_repo_name=请检查您输入的仓库名称是正确。
@ -183,6 +187,9 @@ followers=关注者
starred=已点赞
following=关注中
form.name_reserved=用户名 '%s' 是被保留的。
form.name_pattern_not_allowed=用户名不允许 '%s' 的格式。
[settings]
profile=个人信息
password=修改密码
@ -227,6 +234,7 @@ primary_email=设为主要
delete_email=删除
add_new_email=添加新的邮箱地址
add_email=添加邮箱
add_email_confirmation_sent=一封待确认的电子邮件已发送到 <b>%s</b>,请在 %d 小时内检查您的收件箱,并完成确认过程。
add_email_success=新的邮箱地址添加成功!
manage_ssh_keys=管理 SSH 密钥
@ -282,6 +290,9 @@ create_repo=创建仓库
default_branch=默认分支
mirror_interval=镜像同步周期(小时)
form.name_reserved=仓库名称 '%s' 是被保留的。
form.name_pattern_not_allowed=仓库名称不允许 '%s' 的格式。
need_auth=需要授权验证
migrate_type=迁移类型
migrate_type_helper=本仓库将是 <span class="label label-blue label-radius">镜像</span>
@ -432,6 +443,9 @@ team_name_helper=您可以使用该名称来通知改组全体成员。
team_desc_helper=一句话描述这个团队是做什么的。
team_permission_desc=请选择该团队所具有的权限等级:
form.name_reserved=组织名称 '%s' 是被保留的。
form.name_pattern_not_allowed=组织名称不允许 '%s' 的格式。
settings=组织设置
settings.options=基本设置
settings.full_name=组织全名
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=删除所有仓库存档
dashboard.delete_repo_archives_success=所有仓库存档清除成功!
dashboard.git_gc_repos=对仓库进行垃圾回收
dashboard.git_gc_repos_success=所有仓库垃圾回收成功!
dashboard.resync_all_sshkeys=重新生成 '.ssh/autorized_key' 文件(警告:不是 Gogs 的密钥也会被删除)
dashboard.resync_all_sshkeys=重新生成 '.ssh/authorized_keys' 文件(警告:不是 Gogs 的密钥也会被删除)
dashboard.resync_all_sshkeys_success=所有公钥重新生成成功!
dashboard.resync_all_update_hooks=重新生成所有仓库的 Update 钩子(用于自定义配置文件被修改)
dashboard.resync_all_update_hooks_success=所有仓库的 Update 钩子重新生成成功!
@ -605,6 +619,7 @@ auths.smtp_auth=SMTP 授权类型
auths.smtphost=SMTP 主机地址
auths.smtpport=SMTP 主机端口
auths.enable_tls=启用 TLS 加密
auths.pam_service_name=PAM 服务名称
auths.enable_auto_register=允许授权用户自动注册
auths.tips=帮助提示
auths.edit=修改授权认证设置
@ -653,6 +668,7 @@ config.deliver_timeout=推送超时
config.skip_tls_verify=忽略 TLS 验证
config.mailer_config=邮件配置
config.mailer_enabled=启用服务
config.mailer_disable_helo=禁用 HELO 操作
config.mailer_name=发送者名称
config.mailer_host=邮件主机地址
config.mailer_user=发送者帐号

View file

@ -39,6 +39,13 @@ issues=問題管理
cancel=取消
[search]
search=Search...
repository=Repository
user=User
issue=Issue
code=Code
[install]
install=安裝頁面
title=首次執行安裝程序
@ -150,9 +157,6 @@ org_name_been_taken=組織名稱已經被佔用。
team_name_been_taken=團隊名稱已經被佔用。
email_been_used=郵箱地址已經被使用。
ssh_key_been_used=SSH 密鑰已經被使用。
illegal_username=您的用戶名包含不合法字符。
illegal_repo_name=倉庫名稱包含不合法字符。
illegal_org_name=組織名稱包含不合法字符。
illegal_team_name=團隊名稱包含不合法字符。
username_password_incorrect=用戶名或密碼不正確。
enterred_invalid_repo_name=請檢查您輸入的倉庫名稱是正確。
@ -183,6 +187,9 @@ followers=關註者
starred=已讚好
following=關註中
form.name_reserved=Username '%s' is reserved.
form.name_pattern_not_allowed=Username pattern '%s' is not allowed.
[settings]
profile=個人信息
password=修改密碼
@ -227,6 +234,7 @@ primary_email=设为主要
delete_email=刪除
add_new_email=添加新的電子郵件地址
add_email=添加電子郵件
add_email_confirmation_sent=A new confirmation e-mail has been sent to <b>%s</b>, please check your inbox within the next %d hours to complete the confirmation process.
add_email_success=新的邮箱地址添加成功。
manage_ssh_keys=管理 SSH 密鑰
@ -282,6 +290,9 @@ create_repo=創建倉庫
default_branch=默認分支
mirror_interval=鏡像同步周期(小時)
form.name_reserved=Repository name '%s' is reserved.
form.name_pattern_not_allowed=Repository name pattern '%s' is not allowed.
need_auth=需要授權驗證
migrate_type=遷移類型
migrate_type_helper=本倉庫將是 <span class="label label-blue label-radius">鏡像</span>
@ -432,6 +443,9 @@ team_name_helper=您可以使用該名稱來通知改組全體成員。
team_desc_helper=一句話描述這個團隊是做什麼的。
team_permission_desc=請選擇該團隊所具有的權限等級:
form.name_reserved=Organization name '%s' is reserved.
form.name_pattern_not_allowed=Organization name pattern '%s' is not allowed.
settings=組織設置
settings.options=基本設置
settings.full_name=組織全名
@ -514,7 +528,7 @@ dashboard.delete_repo_archives=刪除所有倉庫存檔
dashboard.delete_repo_archives_success=所有倉庫存檔清除成功!
dashboard.git_gc_repos=對倉庫進行垃圾回收
dashboard.git_gc_repos_success=所有倉庫的垃圾回收已成功完成!
dashboard.resync_all_sshkeys=重新生成 '.ssh/autorized_key' 文件(警告:不是 Gogs 的密鑰也會被刪除)
dashboard.resync_all_sshkeys=重新生成 '.ssh/authorized_keys' 文件(警告:不是 Gogs 的密鑰也會被刪除)
dashboard.resync_all_sshkeys_success=所有公鑰重新生成成功!
dashboard.resync_all_update_hooks=重新生成所有倉庫的 Update 鈎子(用於被修改的自定義配置文件)
dashboard.resync_all_update_hooks_success=已成功重新生成所有倉庫的 Update 鈎子!

View file

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
const APP_VER = "0.6.1.0325 Beta"
const APP_VER = "0.6.1.0703 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())

View file

@ -8,6 +8,32 @@ import (
"fmt"
)
type ErrNameReserved struct {
Name string
}
func IsErrNameReserved(err error) bool {
_, ok := err.(ErrNameReserved)
return ok
}
func (err ErrNameReserved) Error() string {
return fmt.Sprintf("name is reserved: [name: %s]", err.Name)
}
type ErrNamePatternNotAllowed struct {
Pattern string
}
func IsErrNamePatternNotAllowed(err error) bool {
_, ok := err.(ErrNamePatternNotAllowed)
return ok
}
func (err ErrNamePatternNotAllowed) Error() string {
return fmt.Sprintf("name pattern is not allowed: [pattern: %s]", err.Pattern)
}
// ____ ___
// | | \______ ___________
// | | / ___// __ \_ __ \
@ -15,6 +41,32 @@ import (
// |______//____ >\___ >__|
// \/ \/
type ErrUserAlreadyExist struct {
Name string
}
func IsErrUserAlreadyExist(err error) bool {
_, ok := err.(ErrUserAlreadyExist)
return ok
}
func (err ErrUserAlreadyExist) Error() string {
return fmt.Sprintf("user already exists: [name: %s]", err.Name)
}
type ErrEmailAlreadyUsed struct {
Email string
}
func IsErrEmailAlreadyUsed(err error) bool {
_, ok := err.(ErrEmailAlreadyUsed)
return ok
}
func (err ErrEmailAlreadyUsed) Error() string {
return fmt.Sprintf("e-mail has been used: [email: %s]", err.Email)
}
type ErrUserOwnRepos struct {
UID int64
}

View file

@ -282,7 +282,7 @@ type IssueUser struct {
}
// NewIssueUserPairs adds new issue-user pairs for new issue of repository.
func NewIssueUserPairs(repo *Repository, issueID, orgID, posterID, assigneeID int64) (err error) {
func NewIssueUserPairs(repo *Repository, issueID, orgID, posterID, assigneeID int64) error {
users, err := repo.GetCollaborators()
if err != nil {
return err
@ -295,6 +295,7 @@ func NewIssueUserPairs(repo *Repository, issueID, orgID, posterID, assigneeID in
isNeedAddPoster := true
for _, u := range users {
iu.Id = 0
iu.Uid = u.Id
iu.IsPoster = iu.Uid == posterID
if isNeedAddPoster && iu.IsPoster {
@ -306,6 +307,7 @@ func NewIssueUserPairs(repo *Repository, issueID, orgID, posterID, assigneeID in
}
}
if isNeedAddPoster {
iu.Id = 0
iu.Uid = posterID
iu.IsPoster = true
iu.IsAssigned = iu.Uid == assigneeID

View file

@ -17,6 +17,7 @@ import (
"github.com/go-xorm/xorm"
"github.com/gogits/gogs/modules/auth/ldap"
"github.com/gogits/gogs/modules/auth/pam"
"github.com/gogits/gogs/modules/log"
"github.com/gogits/gogs/modules/uuid"
)
@ -28,6 +29,7 @@ const (
PLAIN
LDAP
SMTP
PAM
)
var (
@ -39,12 +41,14 @@ var (
var LoginTypes = map[LoginType]string{
LDAP: "LDAP",
SMTP: "SMTP",
PAM: "PAM",
}
// Ensure structs implemented interface.
var (
_ core.Conversion = &LDAPConfig{}
_ core.Conversion = &SMTPConfig{}
_ core.Conversion = &PAMConfig{}
)
type LDAPConfig struct {
@ -74,6 +78,18 @@ func (cfg *SMTPConfig) ToDB() ([]byte, error) {
return json.Marshal(cfg)
}
type PAMConfig struct {
ServiceName string // pam service (e.g. system-auth)
}
func (cfg *PAMConfig) FromDB(bs []byte) error {
return json.Unmarshal(bs, &cfg)
}
func (cfg *PAMConfig) ToDB() ([]byte, error) {
return json.Marshal(cfg)
}
type LoginSource struct {
Id int64
Type LoginType
@ -97,6 +113,10 @@ func (source *LoginSource) SMTP() *SMTPConfig {
return source.Cfg.(*SMTPConfig)
}
func (source *LoginSource) PAM() *PAMConfig {
return source.Cfg.(*PAMConfig)
}
func (source *LoginSource) BeforeSet(colName string, val xorm.Cell) {
if colName == "type" {
ty := (*val).(int64)
@ -105,6 +125,8 @@ func (source *LoginSource) BeforeSet(colName string, val xorm.Cell) {
source.Cfg = new(LDAPConfig)
case SMTP:
source.Cfg = new(SMTPConfig)
case PAM:
source.Cfg = new(PAMConfig)
}
}
}
@ -169,7 +191,7 @@ func UserSignIn(uname, passwd string) (*User, error) {
// For plain login, user must exist to reach this line.
// Now verify password.
if u.LoginType == PLAIN {
if !u.ValidtePassword(passwd) {
if !u.ValidatePassword(passwd) {
return nil, ErrUserNotExist
}
return u, nil
@ -197,6 +219,13 @@ func UserSignIn(uname, passwd string) (*User, error) {
return u, nil
}
log.Warn("Fail to login(%s) by SMTP(%s): %v", uname, source.Name, err)
} else if source.Type == PAM {
u, err := LoginUserPAMSource(nil, uname, passwd,
source.Id, source.Cfg.(*PAMConfig), true)
if err == nil {
return u, nil
}
log.Warn("Fail to login(%s) by PAM(%s): %v", uname, source.Name, err)
}
}
@ -218,6 +247,8 @@ func UserSignIn(uname, passwd string) (*User, error) {
return LoginUserLdapSource(u, u.LoginName, passwd, source.Id, source.Cfg.(*LDAPConfig), false)
case SMTP:
return LoginUserSMTPSource(u, u.LoginName, passwd, source.Id, source.Cfg.(*SMTPConfig), false)
case PAM:
return LoginUserPAMSource(u, u.LoginName, passwd, source.Id, source.Cfg.(*PAMConfig), false)
}
return nil, ErrUnsupportedLoginType
}
@ -359,3 +390,33 @@ func LoginUserSMTPSource(u *User, name, passwd string, sourceId int64, cfg *SMTP
err := CreateUser(u)
return u, err
}
// Query if name/passwd can login against PAM
// Create a local user if success
// Return the same LoginUserPlain semantic
func LoginUserPAMSource(u *User, name, passwd string, sourceId int64, cfg *PAMConfig, autoRegister bool) (*User, error) {
if err := pam.PAMAuth(cfg.ServiceName, name, passwd); err != nil {
if strings.Contains(err.Error(), "Authentication failure") {
return nil, ErrUserNotExist
}
return nil, err
}
if !autoRegister {
return u, nil
}
// fake a local user creation
u = &User{
LowerName: strings.ToLower(name),
Name: strings.ToLower(name),
LoginType: PAM,
LoginSource: sourceId,
LoginName: name,
IsActive: true,
Passwd: passwd,
Email: name,
}
err := CreateUser(u)
return u, err
}

View file

@ -105,23 +105,23 @@ func IsOrgEmailUsed(email string) (bool, error) {
}
// CreateOrganization creates record of a new organization.
func CreateOrganization(org, owner *User) (*User, error) {
if !IsLegalName(org.Name) {
return nil, ErrUserNameIllegal
func CreateOrganization(org, owner *User) (err error) {
if err = IsUsableName(org.Name); err != nil {
return err
}
isExist, err := IsUserExist(0, org.Name)
if err != nil {
return nil, err
return err
} else if isExist {
return nil, ErrUserAlreadyExist
return ErrUserAlreadyExist{org.Name}
}
isExist, err = IsOrgEmailUsed(org.Email)
if err != nil {
return nil, err
return err
} else if isExist {
return nil, ErrEmailAlreadyUsed
return ErrEmailAlreadyUsed{org.Email}
}
org.LowerName = strings.ToLower(org.Name)
@ -135,11 +135,11 @@ func CreateOrganization(org, owner *User) (*User, error) {
sess := x.NewSession()
defer sessionRelease(sess)
if err = sess.Begin(); err != nil {
return nil, err
return err
}
if _, err = sess.Insert(org); err != nil {
return nil, err
return fmt.Errorf("insert organization: %v", err)
}
// Create default owner team.
@ -151,7 +151,7 @@ func CreateOrganization(org, owner *User) (*User, error) {
NumMembers: 1,
}
if _, err = sess.Insert(t); err != nil {
return nil, err
return fmt.Errorf("insert owner team: %v", err)
}
// Add initial creator to organization and owner team.
@ -162,7 +162,7 @@ func CreateOrganization(org, owner *User) (*User, error) {
NumTeams: 1,
}
if _, err = sess.Insert(ou); err != nil {
return nil, err
return fmt.Errorf("insert org-user relation: %v", err)
}
tu := &TeamUser{
@ -171,14 +171,14 @@ func CreateOrganization(org, owner *User) (*User, error) {
TeamID: t.ID,
}
if _, err = sess.Insert(tu); err != nil {
return nil, err
return fmt.Errorf("insert team-user relation: %v", err)
}
if err = os.MkdirAll(UserPath(org.Name), os.ModePerm); err != nil {
return nil, err
return fmt.Errorf("create directory: %v", err)
}
return org, sess.Commit()
return sess.Commit()
}
// GetOrgByName returns organization by given name.
@ -594,9 +594,9 @@ func (t *Team) RemoveRepository(repoID int64) error {
// NewTeam creates a record of new team.
// It's caller's responsibility to assign organization ID.
func NewTeam(t *Team) error {
if !IsLegalName(t.Name) {
return ErrTeamNameIllegal
func NewTeam(t *Team) (err error) {
if err = IsUsableName(t.Name); err != nil {
return err
}
has, err := x.Id(t.OrgID).Get(new(User))
@ -670,8 +670,8 @@ func GetTeamById(teamId int64) (*Team, error) {
// UpdateTeam updates information of team.
func UpdateTeam(t *Team, authChanged bool) (err error) {
if !IsLegalName(t.Name) {
return ErrTeamNameIllegal
if err = IsUsableName(t.Name); err != nil {
return err
}
if len(t.Description) > 255 {

View file

@ -37,10 +37,10 @@ const (
var (
ErrRepoAlreadyExist = errors.New("Repository already exist")
ErrRepoFileNotExist = errors.New("Repository file does not exist")
ErrRepoNameIllegal = errors.New("Repository name contains illegal characters")
ErrRepoFileNotLoaded = errors.New("Repository file not loaded")
ErrMirrorNotExist = errors.New("Mirror does not exist")
ErrInvalidReference = errors.New("Invalid reference specified")
ErrNameEmpty = errors.New("Name is empty")
)
var (
@ -223,12 +223,12 @@ func (repo *Repository) DescriptionHtml() template.HTML {
}
// IsRepositoryExist returns true if the repository with given name under user has already existed.
func IsRepositoryExist(u *User, repoName string) bool {
has, _ := x.Get(&Repository{
func IsRepositoryExist(u *User, repoName string) (bool, error) {
has, err := x.Get(&Repository{
OwnerId: u.Id,
LowerName: strings.ToLower(repoName),
})
return has && com.IsDir(RepoPath(u.Name, repoName))
return has && com.IsDir(RepoPath(u.Name, repoName)), err
}
// CloneLink represents different types of clone URLs of repository.
@ -243,34 +243,42 @@ func (repo *Repository) CloneLink() (cl CloneLink, err error) {
if err = repo.GetOwner(); err != nil {
return cl, err
}
if setting.SSHPort != 22 {
cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.Domain, setting.SSHPort, repo.Owner.LowerName, repo.LowerName)
cl.SSH = fmt.Sprintf("ssh://%s@%s:%d/%s/%s.git", setting.RunUser, setting.SSHDomain, setting.SSHPort, repo.Owner.LowerName, repo.LowerName)
} else {
cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.Domain, repo.Owner.LowerName, repo.LowerName)
cl.SSH = fmt.Sprintf("%s@%s:%s/%s.git", setting.RunUser, setting.SSHDomain, repo.Owner.LowerName, repo.LowerName)
}
cl.HTTPS = fmt.Sprintf("%s%s/%s.git", setting.AppUrl, repo.Owner.LowerName, repo.LowerName)
return cl, nil
}
var (
illegalEquals = []string{"debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new"}
illegalSuffixs = []string{".git", ".keys"}
reservedNames = []string{"debug", "raw", "install", "api", "avatar", "user", "org", "help", "stars", "issues", "pulls", "commits", "repo", "template", "admin", "new"}
reservedPatterns = []string{"*.git", "*.keys"}
)
// IsLegalName returns false if name contains illegal characters.
func IsLegalName(repoName string) bool {
repoName = strings.ToLower(repoName)
for _, char := range illegalEquals {
if repoName == char {
return false
// IsUsableName checks if name is reserved or pattern of name is not allowed.
func IsUsableName(name string) error {
name = strings.TrimSpace(strings.ToLower(name))
if utf8.RuneCountInString(name) == 0 {
return ErrNameEmpty
}
for i := range reservedNames {
if name == reservedNames[i] {
return ErrNameReserved{name}
}
}
for _, char := range illegalSuffixs {
if strings.HasSuffix(repoName, char) {
return false
for _, pat := range reservedPatterns {
if pat[0] == '*' && strings.HasSuffix(name, pat[1:]) ||
(pat[len(pat)-1] == '*' && strings.HasPrefix(name, pat[:len(pat)-1])) {
return ErrNamePatternNotAllowed{pat}
}
}
return true
return nil
}
// Mirror represents a mirror information of repository.
@ -504,11 +512,14 @@ func initRepository(e Engine, repoPath string, u *User, repo *Repository, initRe
// CreateRepository creates a repository for given user or organization.
func CreateRepository(u *User, name, desc, lang, license string, isPrivate, isMirror, initReadme bool) (_ *Repository, err error) {
if !IsLegalName(name) {
return nil, ErrRepoNameIllegal
if err = IsUsableName(name); err != nil {
return nil, err
}
if IsRepositoryExist(u, name) {
has, err := IsRepositoryExist(u, name)
if err != nil {
return nil, fmt.Errorf("IsRepositoryExist: %v", err)
} else if has {
return nil, ErrRepoAlreadyExist
}
@ -619,7 +630,10 @@ func TransferOwnership(u *User, newOwnerName string, repo *Repository) error {
}
// Check if new owner has repository with same name.
if IsRepositoryExist(newOwner, repo.Name) {
has, err := IsRepositoryExist(newOwner, repo.Name)
if err != nil {
return fmt.Errorf("IsRepositoryExist: %v", err)
} else if has {
return ErrRepoAlreadyExist
}
@ -727,16 +741,22 @@ func TransferOwnership(u *User, newOwnerName string, repo *Repository) error {
}
// ChangeRepositoryName changes all corresponding setting from old repository name to new one.
func ChangeRepositoryName(userName, oldRepoName, newRepoName string) (err error) {
userName = strings.ToLower(userName)
func ChangeRepositoryName(u *User, oldRepoName, newRepoName string) (err error) {
oldRepoName = strings.ToLower(oldRepoName)
newRepoName = strings.ToLower(newRepoName)
if !IsLegalName(newRepoName) {
return ErrRepoNameIllegal
if err = IsUsableName(newRepoName); err != nil {
return err
}
has, err := IsRepositoryExist(u, newRepoName)
if err != nil {
return fmt.Errorf("IsRepositoryExist: %v", err)
} else if has {
return ErrRepoAlreadyExist
}
// Change repository directory name.
return os.Rename(RepoPath(userName, oldRepoName), RepoPath(userName, newRepoName))
return os.Rename(RepoPath(u.LowerName, oldRepoName), RepoPath(u.LowerName, newRepoName))
}
func updateRepository(e Engine, repo *Repository, visibilityChanged bool) (err error) {
@ -1340,7 +1360,10 @@ func IsStaring(uid, repoId int64) bool {
// \/ \/
func ForkRepository(u *User, oldRepo *Repository, name, desc string) (_ *Repository, err error) {
if IsRepositoryExist(u, name) {
has, err := IsRepositoryExist(u, name)
if err != nil {
return nil, fmt.Errorf("IsRepositoryExist: %v", err)
} else if has {
return nil, ErrRepoAlreadyExist
}

View file

@ -36,10 +36,8 @@ const (
)
var (
ErrUserAlreadyExist = errors.New("User already exist")
ErrUserNotExist = errors.New("User does not exist")
ErrUserNotKeyOwner = errors.New("User does not the owner of public key")
ErrEmailAlreadyUsed = errors.New("E-mail already used")
ErrEmailNotExist = errors.New("E-mail does not exist")
ErrEmailNotActivated = errors.New("E-mail address has not been activated")
ErrUserNameIllegal = errors.New("User name contains illegal characters")
@ -145,8 +143,8 @@ func (u *User) EncodePasswd() {
u.Passwd = fmt.Sprintf("%x", newPasswd)
}
// ValidtePassword checks if given password matches the one belongs to the user.
func (u *User) ValidtePassword(passwd string) bool {
// ValidatePassword checks if given password matches the one belongs to the user.
func (u *User) ValidatePassword(passwd string) bool {
newUser := &User{Passwd: passwd, Salt: u.Salt}
newUser.EncodePasswd()
return u.Passwd == newUser.Passwd
@ -273,23 +271,23 @@ func GetUserSalt() string {
}
// CreateUser creates record of a new user.
func CreateUser(u *User) error {
if !IsLegalName(u.Name) {
return ErrUserNameIllegal
func CreateUser(u *User) (err error) {
if err = IsUsableName(u.Name); err != nil {
return err
}
isExist, err := IsUserExist(0, u.Name)
if err != nil {
return err
} else if isExist {
return ErrUserAlreadyExist
return ErrUserAlreadyExist{u.Name}
}
isExist, err = IsEmailUsed(u.Email)
if err != nil {
return err
} else if isExist {
return ErrEmailAlreadyUsed
return ErrEmailAlreadyUsed{u.Email}
}
u.LowerName = strings.ToLower(u.Name)
@ -392,8 +390,15 @@ func VerifyActiveEmailCode(code, email string) *EmailAddress {
// ChangeUserName changes all corresponding setting from old user name to new one.
func ChangeUserName(u *User, newUserName string) (err error) {
if !IsLegalName(newUserName) {
return ErrUserNameIllegal
if err = IsUsableName(newUserName); err != nil {
return err
}
isExist, err := IsUserExist(0, newUserName)
if err != nil {
return err
} else if isExist {
return ErrUserAlreadyExist{newUserName}
}
return os.Rename(UserPath(u.LowerName), UserPath(newUserName))
@ -405,7 +410,7 @@ func UpdateUser(u *User) error {
if err != nil {
return err
} else if has {
return ErrEmailAlreadyUsed
return ErrEmailAlreadyUsed{u.Email}
}
u.LowerName = strings.ToLower(u.Name)
@ -641,7 +646,7 @@ func AddEmailAddress(email *EmailAddress) error {
if err != nil {
return err
} else if used {
return ErrEmailAlreadyUsed
return ErrEmailAlreadyUsed{email.Email}
}
_, err = x.Insert(email)

View file

@ -30,6 +30,7 @@ type AuthenticationForm struct {
SMTPPort int `form:"smtp_port"`
TLS bool `form:"tls"`
AllowAutoRegister bool `form:"allowautoregister"`
PAMServiceName string
}
func (f *AuthenticationForm) Validate(ctx *macaron.Context, errs binding.Errors) binding.Errors {

35
modules/auth/pam/pam.go Normal file
View file

@ -0,0 +1,35 @@
// +build !windows
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package pam
import (
"errors"
"github.com/msteinert/pam"
)
func PAMAuth(serviceName, userName, passwd string) error {
t, err := pam.StartFunc(serviceName, userName, func(s pam.Style, msg string) (string, error) {
switch s {
case pam.PromptEchoOff:
return passwd, nil
case pam.PromptEchoOn, pam.ErrorMsg, pam.TextInfo:
return "", nil
}
return "", errors.New("Unrecognized PAM message style")
})
if err != nil {
return err
}
if err = t.Authenticate(0); err != nil {
return err
}
return nil
}

View file

@ -0,0 +1,15 @@
// +build windows
// Copyright 2014 The Gogs Authors. All rights reserved.
// Use of this source code is governed by a MIT-style
// license that can be found in the LICENSE file.
package pam
import (
"errors"
)
func PAMAuth(serviceName, userName, passwd string) error {
return errors.New("PAM not supported")
}

File diff suppressed because one or more lines are too long

View file

@ -104,13 +104,18 @@ func sendMail(settings *setting.Mailer, recipients []string, msgContent []byte)
return err
}
hostname, err := os.Hostname()
if err != nil {
return err
}
if !setting.MailService.DisableHelo {
hostname := setting.MailService.HeloHostname
if len(hostname) == 0 {
hostname, err = os.Hostname()
if err != nil {
return err
}
}
if err = client.Hello(hostname); err != nil {
return err
if err = client.Hello(hostname); err != nil {
return err
}
}
// If not using SMTPS, alway use STARTTLS if available

View file

@ -139,6 +139,13 @@ func (ctx *Context) Handle(status int, title string, err error) {
ctx.HTML(status, base.TplName(fmt.Sprintf("status/%d", status)))
}
func (ctx *Context) HandleText(status int, title string) {
if (status / 100 == 4) || (status / 100 == 5) {
log.Error(4, "%s", title)
}
ctx.RenderData(status, []byte(title))
}
func (ctx *Context) HandleAPI(status int, obj interface{}) {
var message string
if err, ok := obj.(error); ok {

View file

@ -53,6 +53,7 @@ var (
HttpAddr, HttpPort string
DisableSSH bool
SSHPort int
SSHDomain string
OfflineMode bool
DisableRouterLog bool
CertFile, KeyFile string
@ -232,6 +233,7 @@ func NewConfigContext() {
HttpAddr = sec.Key("HTTP_ADDR").MustString("0.0.0.0")
HttpPort = sec.Key("HTTP_PORT").MustString("3000")
DisableSSH = sec.Key("DISABLE_SSH").MustBool()
SSHDomain = sec.Key("SSH_DOMAIN").MustString(Domain)
SSHPort = sec.Key("SSH_PORT").MustInt(22)
OfflineMode = sec.Key("OFFLINE_MODE").MustBool()
DisableRouterLog = sec.Key("DISABLE_ROUTER_LOG").MustBool()
@ -476,6 +478,8 @@ type Mailer struct {
Host string
From string
User, Passwd string
DisableHelo bool
HeloHostname string
SkipVerify bool
UseCertificate bool
CertFile, KeyFile string
@ -510,6 +514,8 @@ func newMailService() {
Host: sec.Key("HOST").String(),
User: sec.Key("USER").String(),
Passwd: sec.Key("PASSWD").String(),
DisableHelo: sec.Key("DISABLE_HELO").MustBool(),
HeloHostname: sec.Key("HELO_HOSTNAME").String(),
SkipVerify: sec.Key("SKIP_VERIFY").MustBool(),
UseCertificate: sec.Key("USE_CERTIFICATE").MustBool(),
CertFile: sec.Key("CERT_FILE").String(),

File diff suppressed because one or more lines are too long

View file

@ -1,5 +1,5 @@
.home {
padding-bottom: @footer-margin * 2;
padding-bottom: @footer-margin * 3;
.logo {
max-width: 250px;
}

View file

@ -866,7 +866,7 @@ ol.linenums {
border-top-right-radius: .3em;
}
#dashboard-new-repo .octicon {
font-size: 2em;
font-size: 20px;
}
#dashboard-new-repo-menu {
top: 33px;

View file

@ -753,10 +753,17 @@ function initAdmin() {
if (v == 2) {
$('.ldap').toggleShow();
$('.smtp').toggleHide();
$('.pam').toggleHide();
}
if (v == 3) {
$('.smtp').toggleShow();
$('.ldap').toggleHide();
$('.pam').toggleHide();
}
if (v == 4) {
$('.pam').toggleShow();
$('.smtp').toggleHide();
$('.ldap').toggleHide();
}
});

View file

@ -159,7 +159,7 @@
padding-top: 6px;
margin-right: 1px;
.octicon {
font-size: 2em;
font-size: 20px;
}
border-top-left-radius: .3em;
border-top-right-radius: .3em;

View file

@ -25,6 +25,11 @@ The register and sign-in page style
.form-label {
width: 160px;
}
.chk-label {
width: auto;
text-align: left;
margin-left: 176px;
}
.alert{
margin:0 30px 24px 30px;
}
@ -60,4 +65,4 @@ The register and sign-in page style
background-color: #FFF;
margin-left: -15px;
}
}
}

View file

@ -84,6 +84,10 @@ func NewAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Port: form.SMTPPort,
TLS: form.TLS,
}
case models.PAM:
u = &models.PAMConfig{
ServiceName: form.PAMServiceName,
}
default:
ctx.Error(400)
return
@ -166,6 +170,10 @@ func EditAuthSourcePost(ctx *middleware.Context, form auth.AuthenticationForm) {
Port: form.SMTPPort,
TLS: form.TLS,
}
case models.PAM:
config = &models.PAMConfig{
ServiceName: form.PAMServiceName,
}
default:
ctx.Error(400)
return

View file

@ -106,16 +106,19 @@ func NewUserPost(ctx *middleware.Context, form auth.RegisterForm) {
}
if err := models.CreateUser(u); err != nil {
switch err {
case models.ErrUserAlreadyExist:
switch {
case models.IsErrUserAlreadyExist(err):
ctx.Data["Err_UserName"] = true
ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), USER_NEW, &form)
case models.ErrEmailAlreadyUsed:
case models.IsErrEmailAlreadyUsed(err):
ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), USER_NEW, &form)
case models.ErrUserNameIllegal:
case models.IsErrNameReserved(err):
ctx.Data["Err_UserName"] = true
ctx.RenderWithErr(ctx.Tr("form.illegal_username"), USER_NEW, &form)
ctx.RenderWithErr(ctx.Tr("user.form.name_reserved", err.(models.ErrNameReserved).Name), USER_NEW, &form)
case models.IsErrNamePatternNotAllowed(err):
ctx.Data["Err_UserName"] = true
ctx.RenderWithErr(ctx.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), USER_NEW, &form)
default:
ctx.Handle(500, "CreateUser", err)
}
@ -195,7 +198,7 @@ func EditUserPost(ctx *middleware.Context, form auth.AdminEditUserForm) {
u.AllowGitHook = form.AllowGitHook
if err := models.UpdateUser(u); err != nil {
if err == models.ErrEmailAlreadyUsed {
if models.IsErrEmailAlreadyUsed(err) {
ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), USER_EDIT, &form)
} else {

View file

@ -105,7 +105,8 @@ func createRepo(ctx *middleware.Context, owner *models.User, opt api.CreateRepoO
opt.Gitignore, opt.License, opt.Private, false, opt.AutoInit)
if err != nil {
if err == models.ErrRepoAlreadyExist ||
err == models.ErrRepoNameIllegal {
models.IsErrNameReserved(err) ||
models.IsErrNamePatternNotAllowed(err) {
ctx.JSON(422, &base.ApiJsonErr{err.Error(), base.DOC_URL})
} else {
log.Error(4, "CreateRepository: %v", err)
@ -163,7 +164,7 @@ func MigrateRepo(ctx *middleware.Context, form auth.MigrateRepoForm) {
}
return
}
if !u.ValidtePassword(ctx.Query("password")) {
if !u.ValidatePassword(ctx.Query("password")) {
ctx.HandleAPI(422, "Username or password is not correct.")
return
}

View file

@ -239,7 +239,7 @@ func InstallPost(ctx *middleware.Context, form auth.InstallForm) {
// Create admin account.
if err := models.CreateUser(&models.User{Name: form.AdminName, Email: form.AdminEmail, Passwd: form.AdminPasswd,
IsAdmin: true, IsActive: true}); err != nil {
if err != models.ErrUserAlreadyExist {
if !models.IsErrUserAlreadyExist(err) {
setting.InstallLock = false
ctx.Data["Err_AdminName"] = true
ctx.Data["Err_AdminEmail"] = true

View file

@ -65,19 +65,22 @@ func CreatePost(ctx *middleware.Context, form auth.CreateOrgForm) {
}
var err error
if org, err = models.CreateOrganization(org, ctx.User); err != nil {
switch err {
case models.ErrUserAlreadyExist:
if err = models.CreateOrganization(org, ctx.User); err != nil {
switch {
case models.IsErrUserAlreadyExist(err):
ctx.Data["Err_OrgName"] = true
ctx.RenderWithErr(ctx.Tr("form.org_name_been_taken"), CREATE, &form)
case models.ErrEmailAlreadyUsed:
case models.IsErrEmailAlreadyUsed(err):
ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), CREATE, &form)
case models.ErrUserNameIllegal:
case models.IsErrNameReserved(err):
ctx.Data["Err_OrgName"] = true
ctx.RenderWithErr(ctx.Tr("form.illegal_org_name"), CREATE, &form)
ctx.RenderWithErr(ctx.Tr("org.form.name_reserved", err.(models.ErrNameReserved).Name), CREATE, &form)
case models.IsErrNamePatternNotAllowed(err):
ctx.Data["Err_OrgName"] = true
ctx.RenderWithErr(ctx.Tr("org.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), CREATE, &form)
default:
ctx.Handle(500, "CreateUser", err)
ctx.Handle(500, "CreateOrganization", err)
}
return
}

View file

@ -68,7 +68,7 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateOrgSettingForm) {
org.Avatar = base.EncodeMd5(form.Avatar)
org.AvatarEmail = form.Avatar
if err := models.UpdateUser(org); err != nil {
if err == models.ErrEmailAlreadyUsed {
if models.IsErrEmailAlreadyUsed(err) {
ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), SETTINGS_OPTIONS, &form)
} else {

View file

@ -96,12 +96,12 @@ func Http(ctx *middleware.Context) {
// FIXME: middlewares/context.go did basic auth check already,
// maybe could use that one.
if len(auths) != 2 || auths[0] != "Basic" {
ctx.Handle(401, "no basic auth and digit auth", nil)
ctx.HandleText(401, "no basic auth and digit auth")
return
}
authUsername, authPasswd, err = base.BasicAuthDecode(auths[1])
if err != nil {
ctx.Handle(401, "no basic auth and digit auth", nil)
ctx.HandleText(401, "no basic auth and digit auth")
return
}
@ -116,7 +116,7 @@ func Http(ctx *middleware.Context) {
token, err := models.GetAccessTokenBySha(authUsername)
if err != nil {
if err == models.ErrAccessTokenNotExist {
ctx.Handle(401, "invalid token", nil)
ctx.HandleText(401, "invalid token")
} else {
ctx.Handle(500, "GetAccessTokenBySha", err)
}
@ -138,23 +138,23 @@ func Http(ctx *middleware.Context) {
has, err := models.HasAccess(authUser, repo, tp)
if err != nil {
ctx.Handle(401, "no basic auth and digit auth", nil)
ctx.HandleText(401, "no basic auth and digit auth")
return
} else if !has {
if tp == models.ACCESS_MODE_READ {
has, err = models.HasAccess(authUser, repo, models.ACCESS_MODE_WRITE)
if err != nil || !has {
ctx.Handle(401, "no basic auth and digit auth", nil)
ctx.HandleText(401, "no basic auth and digit auth")
return
}
} else {
ctx.Handle(401, "no basic auth and digit auth", nil)
ctx.HandleText(401, "no basic auth and digit auth")
return
}
}
if !isPull && repo.IsMirror {
ctx.Handle(401, "can't push to mirror", nil)
ctx.HandleText(401, "can't push to mirror")
return
}
}

View file

@ -110,14 +110,6 @@ func CreatePost(ctx *middleware.Context, form auth.CreateRepoForm) {
log.Trace("Repository created: %s/%s", ctxUser.Name, repo.Name)
ctx.Redirect(setting.AppSubUrl + "/" + ctxUser.Name + "/" + repo.Name)
return
} else if err == models.ErrRepoAlreadyExist {
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), CREATE, &form)
return
} else if err == models.ErrRepoNameIllegal {
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.illegal_repo_name"), CREATE, &form)
return
}
if repo != nil {
@ -125,7 +117,20 @@ func CreatePost(ctx *middleware.Context, form auth.CreateRepoForm) {
log.Error(4, "DeleteRepository: %v", errDelete)
}
}
ctx.Handle(500, "CreatePost", err)
switch {
case err == models.ErrRepoAlreadyExist:
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), CREATE, &form)
case models.IsErrNameReserved(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), CREATE, &form)
case models.IsErrNamePatternNotAllowed(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), CREATE, &form)
default:
ctx.Handle(500, "CreatePost", err)
}
}
func Migrate(ctx *middleware.Context) {
@ -209,14 +214,6 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
log.Trace("Repository migrated: %s/%s", ctxUser.Name, form.RepoName)
ctx.Redirect(setting.AppSubUrl + "/" + ctxUser.Name + "/" + form.RepoName)
return
} else if err == models.ErrRepoAlreadyExist {
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), MIGRATE, &form)
return
} else if err == models.ErrRepoNameIllegal {
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.illegal_repo_name"), MIGRATE, &form)
return
}
if repo != nil {
@ -230,7 +227,20 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
ctx.RenderWithErr(ctx.Tr("form.auth_failed", err), MIGRATE, &form)
return
}
ctx.Handle(500, "MigratePost", err)
switch {
case err == models.ErrRepoAlreadyExist:
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), MIGRATE, &form)
case models.IsErrNameReserved(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), MIGRATE, &form)
case models.IsErrNamePatternNotAllowed(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), MIGRATE, &form)
default:
ctx.Handle(500, "MigratePost", err)
}
}
func getForkRepository(ctx *middleware.Context) (*models.Repository, error) {
@ -323,14 +333,6 @@ func ForkPost(ctx *middleware.Context, form auth.CreateRepoForm) {
log.Trace("Repository forked: %s/%s", ctxUser.Name, repo.Name)
ctx.Redirect(setting.AppSubUrl + "/" + ctxUser.Name + "/" + repo.Name)
return
} else if err == models.ErrRepoAlreadyExist {
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), FORK, &form)
return
} else if err == models.ErrRepoNameIllegal {
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.illegal_repo_name"), CREATE, &form)
return
}
if repo != nil {
@ -338,7 +340,21 @@ func ForkPost(ctx *middleware.Context, form auth.CreateRepoForm) {
log.Error(4, "DeleteRepository: %v", errDelete)
}
}
ctx.Handle(500, "ForkPost", err)
// FIXME: merge this with other 2 error handling in to one.
switch {
case err == models.ErrRepoAlreadyExist:
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), FORK, &form)
case models.IsErrNameReserved(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), FORK, &form)
case models.IsErrNamePatternNotAllowed(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), FORK, &form)
default:
ctx.Handle(500, "ForkPost", err)
}
}
func Action(ctx *middleware.Context) {

View file

@ -53,15 +53,18 @@ func SettingsPost(ctx *middleware.Context, form auth.RepoSettingForm) {
newRepoName := form.RepoName
// Check if repository name has been changed.
if ctx.Repo.Repository.Name != newRepoName {
if models.IsRepositoryExist(ctx.Repo.Owner, newRepoName) {
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), SETTINGS_OPTIONS, nil)
return
} else if err := models.ChangeRepositoryName(ctx.Repo.Owner.Name, ctx.Repo.Repository.Name, newRepoName); err != nil {
if err == models.ErrRepoNameIllegal {
if err := models.ChangeRepositoryName(ctx.Repo.Owner, ctx.Repo.Repository.Name, newRepoName); err != nil {
switch {
case err == models.ErrRepoAlreadyExist:
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("form.illegal_repo_name"), SETTINGS_OPTIONS, nil)
} else {
ctx.RenderWithErr(ctx.Tr("form.repo_name_been_taken"), SETTINGS_OPTIONS, &form)
case models.IsErrNameReserved(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_reserved", err.(models.ErrNameReserved).Name), SETTINGS_OPTIONS, &form)
case models.IsErrNamePatternNotAllowed(err):
ctx.Data["Err_RepoName"] = true
ctx.RenderWithErr(ctx.Tr("repo.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), SETTINGS_OPTIONS, &form)
default:
ctx.Handle(500, "ChangeRepositoryName", err)
}
return

View file

@ -249,16 +249,19 @@ func SignUpPost(ctx *middleware.Context, cpt *captcha.Captcha, form auth.Registe
}
if err := models.CreateUser(u); err != nil {
switch err {
case models.ErrUserAlreadyExist:
switch {
case models.IsErrUserAlreadyExist(err):
ctx.Data["Err_UserName"] = true
ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), SIGNUP, &form)
case models.ErrEmailAlreadyUsed:
case models.IsErrEmailAlreadyUsed(err):
ctx.Data["Err_Email"] = true
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), SIGNUP, &form)
case models.ErrUserNameIllegal:
case models.IsErrNameReserved(err):
ctx.Data["Err_UserName"] = true
ctx.RenderWithErr(ctx.Tr("form.illegal_username"), SIGNUP, &form)
ctx.RenderWithErr(ctx.Tr("user.form.name_reserved", err.(models.ErrNameReserved).Name), SIGNUP, &form)
case models.IsErrNamePatternNotAllowed(err):
ctx.Data["Err_UserName"] = true
ctx.RenderWithErr(ctx.Tr("user.form.name_pattern_not_allowed", err.(models.ErrNamePatternNotAllowed).Pattern), SIGNUP, &form)
default:
ctx.Handle(500, "CreateUser", err)
}

View file

@ -50,21 +50,20 @@ func SettingsPost(ctx *middleware.Context, form auth.UpdateProfileForm) {
// Check if user name has been changed.
if ctx.User.Name != form.UserName {
isExist, err := models.IsUserExist(ctx.User.Id, form.UserName)
if err != nil {
ctx.Handle(500, "IsUserExist", err)
return
} else if isExist {
ctx.RenderWithErr(ctx.Tr("form.username_been_taken"), SETTINGS_PROFILE, &form)
return
} else if err = models.ChangeUserName(ctx.User, form.UserName); err != nil {
switch err {
case models.ErrUserNameIllegal:
ctx.Flash.Error(ctx.Tr("form.illegal_username"))
if err := models.ChangeUserName(ctx.User, form.UserName); err != nil {
switch {
case models.IsErrUserAlreadyExist(err):
ctx.Flash.Error(ctx.Tr("form.username_been_taken"))
ctx.Redirect(setting.AppSubUrl + "/user/settings")
case models.ErrEmailAlreadyUsed:
case models.IsErrEmailAlreadyUsed(err):
ctx.Flash.Error(ctx.Tr("form.email_been_used"))
ctx.Redirect(setting.AppSubUrl + "/user/settings")
case models.IsErrNameReserved(err):
ctx.Flash.Error(ctx.Tr("user.form.name_reserved"))
ctx.Redirect(setting.AppSubUrl + "/user/settings")
case models.IsErrNamePatternNotAllowed(err):
ctx.Flash.Error(ctx.Tr("user.form.name_pattern_not_allowed"))
ctx.Redirect(setting.AppSubUrl + "/user/settings")
default:
ctx.Handle(500, "ChangeUserName", err)
}
@ -204,7 +203,7 @@ func SettingsEmailPost(ctx *middleware.Context, form auth.AddEmailForm) {
}
if err := models.AddEmailAddress(e); err != nil {
if err == models.ErrEmailAlreadyUsed {
if models.IsErrEmailAlreadyUsed(err) {
ctx.RenderWithErr(ctx.Tr("form.email_been_used"), SETTINGS_EMAILS, &form)
return
}

View file

@ -33,7 +33,7 @@ LOGFILE=${GOGS_HOME}/log/gogs.log
RETVAL=0
# Read configuration from /etc/sysconfig/gogs to override defaults
[ -r /etc/sysconfig/$NAME ] && ./etc/sysconfig/$NAME
[ -r /etc/sysconfig/$NAME ] && . /etc/sysconfig/$NAME
# Don't do anything if nothing is installed
[ -x ${GOGS_PATH} ] || exit 0

View file

@ -1 +1 @@
0.6.1.0325 Beta
0.6.1.0703 Beta

View file

@ -91,6 +91,12 @@
<label class="req" for="smtp_port">{{.i18n.Tr "admin.auths.smtpport"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_SmtpPort}}ipt-error{{end}}" id="smtp_port" name="smtp_port" value="{{.Source.SMTP.Port}}" />
</div>
{{else if eq $type 4}}
<div class="field">
<label class="req" for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_PAMServiceName}}ipt-error{{end}}" id="pam_service_name" name="pam_service_name" value="{{.Source.PAM.ServiceName}}" />
</div>
{{end}}
<div class="field">

View file

@ -86,6 +86,12 @@
<input class="ipt ipt-large ipt-radius {{if .Err_SmtpPort}}ipt-error{{end}}" id="smtp_port" name="smtp_port" value="{{.smtp_port}}" />
</div>
</div>
<div class="pam hidden">
<div class="field">
<label class="req" for="pam_service_name">{{.i18n.Tr "admin.auths.pam_service_name"}}</label>
<input class="ipt ipt-large ipt-radius {{if .Err_PAMServiceName}}ipt-error{{end}}" id="pam_service_name" name="pam_service_name" value="{{.pam_service_name}}" />
</div>
</div>
<div class="field">
<div class="smtp hidden">
<label></label>

View file

@ -121,6 +121,8 @@
<dd><i class="fa fa{{if .MailerEnabled}}-check{{end}}-square-o"></i></dd>
{{if .MailerEnabled}}<dt>{{.i18n.Tr "admin.config.mailer_name"}}</dt>
<dd>{{.Mailer.Name}}</dd>
<dt>{{.i18n.Tr "admin.config.mailer_disable_helo"}}</dt>
<dd><i class="fa fa{{if .Mailer.DisableHelo}}-check{{end}}-square-o"></i></dd>
<dt>{{.i18n.Tr "admin.config.mailer_host"}}</dt>
<dd>{{.Mailer.Host}}</dd>
<dt>{{.i18n.Tr "admin.config.mailer_user"}}</dt>

View file

@ -2,24 +2,26 @@
{{template "ng/base/header" .}}
<div id="setting-wrapper" class="main-wrapper">
<div id="org-setting" class="container clear">
{{template "explore/nav" .}}
{{template "explore/nav" .}}
<div class="grid-4-5 left">
<div class="setting-content">
<div id="org-repo-list">
{{range .Repos}}
<div class="org-repo-item">
<ul class="org-repo-status right">
<li><i class="octicon octicon-star"></i> {{.NumStars}}</li>
<li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li>
</ul>
<h2><a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Name}}</a></h2>
<p class="org-repo-description">{{.Description}}</p>
<p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
</div>
{{end}}
</div>
</div>
<div id="org-repo-list">
{{range .Repos}}
<div class="org-repo-item">
<ul class="org-repo-status right">
<li><i class="octicon octicon-star"></i> {{.NumStars}}</li>
<li><i class="octicon octicon-git-branch"></i> {{.NumForks}}</li>
</ul>
<h2>
<a href="{{AppSubUrl}}/{{.Owner.Name}}/{{.Name}}">{{.Owner.Name}} / {{.Name}}</a>
</h2>
<p class="org-repo-description">{{.Description}}</p>
<p class="org-repo-updated">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p>
</div>
{{end}}
</div>
</div>
</div>
</div>
</div>
{{template "ng/base/footer" .}}
{{template "ng/base/footer" .}}

View file

@ -17,8 +17,9 @@
</div>
{{if not .IsSocialLogin}}
<div class="field">
<span class="form-label"></span>
<input class="ipt-chk" id="remember" name="remember" type="checkbox"/>&nbsp;&nbsp;&nbsp;&nbsp;<strong>{{.i18n.Tr "auth.remember_me"}}</strong>
<label class="chk-label">
<input class="ipt-chk" id="remember" name="remember" type="checkbox"/>&nbsp;&nbsp;&nbsp;&nbsp;<strong>{{.i18n.Tr "auth.remember_me"}}</strong>
</label>
</div>
{{end}}
<div class="field">
@ -41,4 +42,4 @@
</div>
</form>
</div>
{{template "ng/base/footer" .}}
{{template "ng/base/footer" .}}